
Hello once again. So I continue to issue thousands of HTTP GET requests to a local apache an got some ThreadScope pictures and numbers (BTW, I all this happens on a 4-core machine). I would point out the following as deserving an explanation: 1. It looks like that none of tests used resources of more than 2 cores. 2. Sometimes there is no activity in any thread of a running program (get.N4qg_withgaps.eventlog.png, does this mean that process is in a OS queue for scheduling or something else?) 3. Without RTS's -c or -qg multithreaded run suffers from excessive GC actions. 4. Even with -c/-qg thread's run looks to be iterrupted too frequent. 5. Provided that 10000 requests in a row can be completed in ~3.4s I would expect that 4 threads might come close or even under 1s, but 1.9s was the best result. 10000 requests sequentially: 18:02 sacha@loft4633:/tmp 81> for i in `seq 1 5 `;do ./get 1 10000;done 1 3.320623s 1 3.381713s 1 3.394865s 1 3.470693s 1 3.336757s Using 3 thread and no RTS support 18:20 sacha@loft4633:/tmp 101> for i in `seq 1 5 `;do ./get 3 10000 ;done 3 3.055638s 3 3.226093s 3 3.079507s 3 3.087109s 3 3.279543s Using 3 threads with RTS support 17:58 sacha@loft4633:/tmp 80> for i in `seq 1 5 `;do ./get 3 10000 +RTS -N3;done 3 10.971925s 3 9.805483s 3 10.644644s 3 10.734496s 3 9.008394s Using 3 threads with RTS -c 17:58 sacha@loft4633:/tmp 79> for i in `seq 1 5 `;do ./get 3 10000 +RTS -N3 -c;done 3 2.198638s 3 2.203567s 3 2.190789s 3 2.258964s 3 2.21575s 4 threads with RTS -c 18:22 sacha@loft4633:/tmp 103> for i in `seq 1 5 `;do ./get 4 10000 +RTS -N4 -c;done 4 1.998448s 4 1.970375s 4 2.016234s 4 1.946955s 4 1.983241s 4 thread disabled parallel GC 18:35 sacha@loft4633:/tmp 147> for i in `seq 1 5 `;do ./get 4 10000 +RTS -N4 -qg ;done 4 2.511088s 4 1.939382s 4 1.888141s 4 1.916858s 4 1.913141s The worst results are achieved for plain -N4 18:43 sacha@loft4633:/tmp 157> for i in `seq 1 5 `;do ./get 4 10000 +RTS -N4;done 4 20.043056s 4 17.02037s 4 16.00271s 4 17.061253s 4 15.914139s