Step by step to build webim (3)-Performance Testing

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.