-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
I have finished a dedicated opensocial server that can be browsed from the test coverage at http://drupal-demo.pokersource.info/opensocial-server-coverage/ until it gets its own URL. The goal is mainly to reduce the memory footprint when running a long-polling web application such as jpoker. I've run ab (apache benchmark) with the following script: set -ex count=${1:-500} # comment out to create /tmp/cachegrind* results that can be analyzed with webgrind #cachegrind="-d xdebug.profiler_enable=on" st=$(php create-token.php) pattern='405 Not Allowed' url=http://127.0.0.1/images # expected to return a page containing $pattern echo "url=$url&authz=signed&httpMethod=POST&postData=a%3Db&output=js&st=$st" > postData time php $cachegrind ../opensocial-server $(pwd)/../shindig 8085 127.0.0.1 & trap "pkill -f '\.\./opensocial-server'" EXIT QUIT INT sleep 1 ab -v 4 -c 1 -n 1 -T application/x-www-form-urlencoded -p postData 'http://127.0.0.1:8085/' | grep "$pattern" ab -c 5 -n $count -T application/x-www-form-urlencoded -p postData 'http://127.0.0.1:8085/' and got the following results: Document Length: 234 bytes Concurrency Level: 5 Time taken for tests: 26.910 seconds Complete requests: 5000 Failed requests: 0 Write errors: 0 Non-2xx responses: 5000 Total transferred: 1300000 bytes Total POSTed: 2075000 HTML transferred: 1170000 bytes Requests per second: 185.80 [#/sec] (mean) Time per request: 26.910 [ms] (mean) Time per request: 5.382 [ms] (mean, across all concurrent requests) Transfer rate: 47.18 [Kbytes/sec] received 75.30 kb/s sent 122.48 kb/s total Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.2 0 6 Processing: 5 27 2.4 26 75 Waiting: 0 27 2.4 26 75 Total: 6 27 2.4 26 75 Percentage of the requests served within a certain time (ms) 50% 26 66% 26 75% 26 80% 26 90% 28 95% 30 98% 34 99% 38 100% 75 (longest request) + pkill -f '\.\./opensocial-server' real 0m27.968s user 0m23.885s sys 0m1.796s My interpretation is the following: The user+sys time account for more than 90% of the real time (as reported by the time(1) command, meaning the server spends less than 10% of its total time waiting for I/O. This is consistent with the fact that 5 simultaneous requests take 25 ms to complete. The bottleneck is the CPU, therefore X simultaneous requests will take 5*X ms to complete. This is confirmed by running 100 simultaneous requests, each requiring 500ms to complete. While running the benchmark I have also verified that the memory footprint of the server is stable, up to 500 users (the server is using select and cannot support more than 512 proxied connections, amounting to over 1024 file descriptors). Please let me know if you see a flaw in the logic of my benchmark. Cheers -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkvxb0oACgkQ8dLMyEl6F22NwQCffxR3ERn8YSnWC9TvSZIcxDAn 2/8AmwQfTYT7UY5KS9Fy8IeguVhVLNGq =VR1+ -----END PGP SIGNATURE-----
<<attachment: loic.vcf>>
_______________________________________________ Pokersource-users mailing list [email protected] https://mail.gna.org/listinfo/pokersource-users
