Thursday, April 03, 2008

ว่าด้วยตัว test jabber ต่อ

jabber simul ก็ใช้ได้ง่ายดีนะ

ค่า config ให้ดูในเว็บ เวลาไม่เอาเค้าใส่ตัว x ไว้หน้า tag ที่ไม่ใช้เฉยๆ
ดูจากใน example ได้

แต่ที่จะจดไว้คือ
เราต้องอย่าลืมเพิ่ม limit การเข้าถึง file i/o ด้วยคำสั่ง
และเพิ่มการจอง virtual memory ของ java ที่ใช้ run openfire

ulimit -n [จำนวน limit]

ผมนั่งๆกรอกดูว่ามันได้ค่ามากสุดเท่าไร เพราะทำเป็น unlimited ไม่เป็น ได้เป็นอย่างนี้ เกินกว่านี้ไม่ได้
ulimit -n 1048576

ถ้าจะดูว่า linux มัน limit อะไรได้มั่งก็ใช้คำสั่ง
ulimit -a

# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m)
unlimitedopen files (-n) 1048576
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 8192
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

มีคนเค้าเพิ่ม stack size ด้วยคำสั่ง ulimit -s 2048 หรือมากกว่านี้ด้วย

การเพิ่ม vm ทำได้โดยเพิ่ม parameter "-Xms1024m -Xmx2048m เพิ่มเป็น 2GB ไง
How to increase JAVA Memory in Openfire 3.3.2
http://www.igniterealtime.org/community/message/151499

How Do I Increase Java Memory?
http://www.igniterealtime.org/community/message/166435

สำหรับ linux
Add a line like this in
/etc/sysconfig/openfire

OPENFIRE_OPTS="-Xms256m -Xmx512m"

สำหรับ windows (โดนว่าๆไม่อ่านคู่มือ INSTALL ด้วยนิ)
If you are using windows,
in the bin folder under your openfire directory,
you need to create/edit 1 of two files.

If running via the GUI console,
create/edit the file ''openfired.vmoptions''.

In this file, add the following lines...-Xms512m-Xmx1024m

If you are running as a service, copy the file to another file named,
''openfire-service.vmoptions''.

Hope this helps.

Message was edited by: ldove

จากนั้นไปรัน jab_simul ใหม่
ผลที่ได้น่าจะรับ load ได้ดีขึ้น

1 comment:

Anonymous said...

GDI ธุรกิจออนไลน์ งานออนไลน์ งานผ่านเน็ต ทำงานบนเน็ต100% เพิ่มรายได้เสร็ม
ไม่ต้องขาย ไม่ประชุม ถูกกฎหมาย ทำ งาน ออนไลน์ รายได้ดี
ทำ งาน ที่บ้าน ทาง เน็ต 100% ฟรี 7วัน
http://www.easyforrich.ws/