Webim Series
In step-by-step webim (1) and (2), we have discussed how to develop a webim and use cache to improve webim performance.ProgramSimulate a large number of user logins to test webim performance.
1.200 users online simultaneously
Test 1 simulates a chat room where 200 users log on at the same time. Each user sends a message at a speed of 1 message/second (due to the delay in processing the network and server, it may be more than 1 second)
Environment Parameters
Operating System: Window Server 2003
Memory: 2 GB
CPU: AMD athlon (TM) 64x2 dual 2.4 GHz
Server: IIS6
Database: SQLite
Message cache: 200
Test process
Test Results
Test Result Analysis
The test program starts 200 receiving threads and 200 sending threads (send messages at a speed of 1 message/second and send 50 messages consecutively). According to the test results, the average latency of sending messages is about 1000 ms (that is, about 1000 ms from the client to the server to write messages to the cache ), the average latency of receiving a message is about 600 ms (the server writes the message to the cache ms before the user receives the message in the browser ). Since each user receives messages from the other 199 users, 200 receiving threads should have 200*50*200 = 2000000 messages if the messages are fully received. Obviously, when the 200 threads that send messages end, the thread that receives the messages still does not end. Because the average latency of sending messages is about 1000 ms, it is equivalent to sending messages to the chat room at a time of 1 message/2 seconds.
2.500 users online simultaneously
Test 1 simulates a chat room where 500 users log on at the same time. Each user sends a message at a speed of 1 message/second (due to the delay in processing the network and server, it may be more than 1 second)
Environment Parameters
Operating System: Window Server 2003
Memory: 2 GB
CPU: AMD athlon (TM) 64x2 dual 2.4 GHz
Server: IIS6
Database: SQLite
Message cache: 200
Test process
Test Results
The meaning of the test result is similar to that of test 1, so no detailed analysis is performed.
From the test above, when the number of concurrent online users reaches 500, the latency is still relatively large.
Download the test program and webim source code