I thought it would be interesting to see some performance testing. This time we simulate 1000 request with 5 concurent connections.
[demo]# ab -c 5 -n 1000 http://demo.livehelperchat.com/index.php/chat/syncuser/6/22/1e16f65d63f270401f90082a6fac9f3200ddab5d
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking demo.livehelperchat.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: nginx
Server Hostname: demo.livehelperchat.com
Server Port: 80Document Path: /index.php/chat/syncuser/6/22/1e16f65d63f270401f90082a6fac9f3200ddab5d
Document Length: 103 bytesConcurrency Level: 5
Time taken for tests: 5.349 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 462000 bytes
HTML transferred: 103000 bytes
Requests per second: 186.94 [#/sec] (mean)
Time per request: 26.746 [ms] (mean)
Time per request: 5.349 [ms] (mean, across all concurrent requests)
Transfer rate: 84.34 [Kbytes/sec] receivedConnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 15 27 17.0 24 235
Waiting: 15 27 17.0 24 235
Total: 15 27 17.0 24 235Percentage of the requests served within a certain time (ms)
50% 24
66% 25
75% 27
80% 28
90% 35
95% 41
98% 52
99% 73
100% 235 (longest request)
As you see application can handle about 180 requests per second. Having in mind that this request during chat is send every 3.5 seconds. We can support upto 600 chatting users at the same time if my calculations are correct :) (180*3.5 = 630)
Small release compared to previous one, but it does one amazing thing. Now all messages from user or operators will be checked using same query. Last message ID algorithm for user was implemented. I think it's one of the last performance related part. Futher updates will include more features than refactoring. We now have really nice live support engine.
Resume:
execute doc/update_db/update_17.sql and follow standard upgrade instructions.
Finally released new version. This version brings a lot of improvements. This release brings whole bunch of changes, most important is the performance ones, I have spend a lot of time optimizing every single query, and limiting requests number to minimum. There is few things I still would like to change, but for the moment it will be just fine. So now every single query is using index.
Read full post for changelog
Enchancements:
1. Remember me functionality
2. How many pages user have visited functionality
3. First time user visit tracking
execute doc/update_db/update_15.sql
and follow standard update instructions
P.s Demo also was updated,
Enchancements:
1. Fixed few more short tags.
2. Implemented - https://github.com/remdex/livehelperchat/issues/9 canned messages for desktop client.
3. Usability updates for online users. Then URL is very long it streches the table.
4. Option to turn of online operators tabs completely. Online operators tab will be hidden by default now.
execute doc/update_db/update_14.sql
and follow standard update instructions
P.s Demo also was updated, desktop client zip also.