|
"How
much resources (RAM, CPU, Bandwidth...) do you need to run
jChatBox with many simultaneous users ?"
Important keys to answer this question are provided in this
section. A load test has been made under a medium server
(PIII 800Mhz, 512MB RAM, Windows NT4 and Tomcat 4) with
160 simultaneous users in 20 rooms. It worked nice with
45% CPU, 230MB RAM and 250KBytes/s Network load.
Load
Technical parameters
:
Load architecture :
The load test has been made thanks to open source OpenSTA
tools. We've modeling an HTTP
script that has been played simultaneously 160 times
from Host computers (Injectors) to the Web Application Environment
(Server). We enabled some NT performance collectors to get
information such as CPU load, JVM memory usage ... We ran
that test under an Ethernet 10Mb/s LAN (Intranet). The HTTP
script includes a typical 10 minutes chat
session using most jChatBox features (broadcast and
private messages, URL filtering, commands, refresh).
WebApplication Environment (Server ): |
| Hardware
: |
Intel Pentium III - 800 Mhz - 512MB RAM |
| Operating
System : |
Windows
NT 4.0 - Service Pack 6a
NT performance counters :
- % Processor Time (java.exe CPU load)
- % Disk Time
- Working Set (java .exe mem. usage) : |
| Java
: |
JDK
1.4.1 from SUN.
JAVA_OPTS=-Xms128m -Xmx512m |
| Servlet
Engine : |
TOMCAT
4.1.24-LE with modified server.xml such as
:
- maxProcessors="800" :
To have up to 800 simultaneous threads.
- acceptCount="100" :
- Embedded web server, port 8080
- No existing (serialized) sessions. |
| jChatBox
: |
20
rooms :
Room #1 to Room #15
(English, BufferedFramed mode, Refresh mode = Action-Tracker,
History = 35, Refresh limit = 8s, 50 max. users, HTML
Filter and URL Filter enabled)
Room #16 to Room #20
(English, Framed mode, Refresh mode = Action-Tracker,
History = 35, Refresh limit = 8s, 50 max. users, HTML
Filter and URL Filter enabled). Download
matching jchatbox.ser. |
Load Evolution :
The load test has been made with 160 users. There is a delay
to login all users. There is also a delay to logout all
users. According to the graph below, 160 users are simultaneously
logged in (and chatting) after 5 minutes and before 12 minutes.
The whole load test lasts around 17 minutes.

Download
OpenSTA load summary.txt
Load
Results/Graphs
:
JVM CPU Load :
JVM memory usage is the rate of total CPU used by the java.exe
process (JVM) under Windows NT4. According to the graph
below, with 160 simultaneous users, around 45% CPU is needed.

JVM Memory Usage :
JVM memory usage is the amount of memory used by java.exe
process under Windows NT4. To be more precise, it is called
"Working Set" in NT performance counters. According
to the graph below, with 160 simultaneous users, around
230 MB RAM are needed by the JVM 1.4.1.

Network load :
Network load is the amount of sent/received bytes by the
server. According to the graph below, with 160 simultaneous
users, 250 KBytes/s are transfered.

Reponse Time :
Response time in milliseconds is the delay between the time
a chat message is sent to the server and the time the response
is received from the server. According to the graph below,
average response time is around 30 milliseconds on a LAN
network.

Others results :
- Disk usage was 0% during the load test.
- No errors (TCP, HTTP) occur during the load test.
Improvements
:
How
to lower network load ?
Network load is linked to HTML page size tranferred on each
message post or refresh. Average page size is about 5KB.
HTML page size could be lowered by descreasing history parameter
(number of past messages posted in the chat). You could
also try to optimize JSP pages (remove quotes, improve stylesheet).
Another solution is to not use HTML skins but Applet clients
instead. Average transfert for Applet clients is about 500
bytes on each refresh.
How
to lower CPU load ?
Tomcat is not the best servlet engine, try to switch to
another engine or application server. Do the same for the
SUN JVM. Switch to another JVM such as the one provided
by IBM or BEA. It might be a little bit better.
<<
back to jChatBox Support
|