Hi Yaroslav,
Here my output from the server:
2012-06-24 14:05:43 [2659:0xb74ebb50]: nxweb binding :8055 for http
2012-06-24 14:05:43 [2659:0xb74ebb50]: NXWEB startup: pid=2659 net_threads=4 pg=4096 short=2 int=4 long=4 size_t=4 evt=32 conn=1092 req=164 td=1064
2012-06-24 14:05:43 [2659:0xb74ebb50]: handler benchmark_inworker [100] registered for url: /benchmark-inworker
2012-06-24 14:05:43 [2659:0xb74ebb50]: handler benchmark [100] registered for url: /benchmark-inprocess
2012-06-24 14:05:43 [2659:0xb74ebb50]: handler test [900] registered for url: /test
2012-06-24 14:05:43 [2659:0xb74ebb50]: handler hello [1000] registered for url: /hello
2012-06-24 14:05:43 [2659:0xb74ebb50]: handler nxweb_8777 [10000] registered for url: /8777
2012-06-24 14:05:43 [2659:0xb74ebb50]: handler java_test [10000] registered for url: /java-test
2012-06-24 14:05:43 [2659:0xb74ebb50]: handler sendfile [900000] registered for url: (null)
2012-06-24 14:05:43 [2659:0xb74ebb50]: handler default [999999999] registered for url: (null)
2012-06-24 14:05:43 [2659:0xb74ebb50]: module cache [0] successfully initialized
2012-06-24 14:05:43 [2659:0xb74ebb50]: using default request dispatcher
From your remark I conclude that indeed four threads are started.
Here my output from the benchmark:
weighttp -n 1000000 -c 100 -t 4 -k http://localhost:8055/benchmark-inprocess
weighttp - a lightweight and simple webserver benchmarking tool
starting benchmark...
spawning thread #1: 25 concurrent requests, 250000 total requests
spawning thread #2: 25 concurrent requests, 250000 total requests
spawning thread #3: 25 concurrent requests, 250000 total requests
spawning thread #4: 25 concurrent requests, 250000 total requests
progress: 10% done
...
progress: 100% done
finished in 18 sec, 261 millisec and 105 microsec, 54761 req/s, 9091 kbyte/s
requests: 1000000 total, 1000000 started, 1000000 done, 1000000 succeeded, 0 failed, 0 errored
status codes: 1000000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 170000000 bytes total, 150000000 bytes http, 20000000 bytes data
I was wondering whether the status code says something about the process. Because there are four of those, I figured that might be related to number of processes. There is 2xx, 3xx, 4xx, 5xx and all messages seem to be related to 2xx.
From my performance monitor I can see that the four CPU's are at 80[%] during the entire benchmark, this is a flat line for all four. My swap memory (2[Gib]) is at zero percent and my memory usage is about 700[MB] which is approximately 17[%] of 3.9[Gib]. The swap and and memory don't seem to change during the benchmark. Should the swap memory be used?
My processor data: (There are four of those)
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel(R) Core(TM) i5 CPU M 580 @ 2.67GHz
stepping : 5
cpu MHz : 1199.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 2
cpu cores : 2
apicid : 4
initial apicid : 4
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt aes lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
bogomips : 5321.05
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
Since you are stating that your current performance is around 500[K#/s] and mine is about 50[K#/s], my naive assumption is that your benchmark should be approx 30% faster based on the difference in CPU. This means that there must be another reason for the difference.
Hope these data help to give more insight in the differences. Could you help me a bit further in resolving this. Your help is much appreciated!
Thanks,
Marcel
On Sunday, June 24, 2012 8:22:44 AM UTC+2, Yaroslav wrote:
Nxweb writes config parameters into log upon startup. Check it. It should look like this:
NXWEB startup: pid=1234 net_threads=4 ...
Could you please provide more details about your hardware. Like CPU model number, memory clock speed, etc. Is it laptop or desktop PC?
Have you checked if your system isn't short on memory, is it using swap or not?