FYI luke2012,
I made a test with simulated incoming connection with ab.
SW: WinXp sp3,B4j 2.0 and SQL library v1.10.
HW: Intel T7300 4G SSD pxm5s 128g
The test results are not accurate, with 10%-20% variation.
---------
-n500 -c10 Results:
100% read:1066.67 [#/sec] (mean)
90% read: 864.86 [#/sec] (mean)
50% read:680.85 [#/sec] (mean)
10% read:695.65 [#/sec] (mean)
0% read:727.27 [#/sec] (mean)
---------
-n5000 -c10 Results:
100% read:831.17 [#/sec] (mean)
90% read:831.17 [#/sec] (mean)
50% read:769.23 [#/sec] (mean)
10% read:732.27 [#/sec] (mean)
0% read: 728.93 [#/sec] (mean)
---------
-n5000 -c100 Results:
100% read:694.14 [#/sec] (mean)
90% read:686.70 [#/sec] (mean)
50% read:603.77 [#/sec] (mean)
10% read:576.58 [#/sec] (mean)
0% read:544.22 [#/sec] (mean)
How the test is Done:
1.Simulate incoming connection with ab(apache benchmark), with two parameters, id and p.
1.1 id is the test ID which is used to pass the identify the test.It will be recorded in "errorlog.txt" if any exception.
1.2 p is the percentage of read, an integer 0-100, when p=50 there is 50% that the thread will read a random value from db.
1.3 Write a "test.bat" file under the same path of "ab.exe". -n500 means 500 connections will be sent totally, -c10 means 10 concurrent connections:
Code:
ab -n500 -c10 "http://192.168.1.100:51042/update?id=1&p=100" >>testres.txt
2.Run the B4J server at release mode.
3.Run the test.bat, and wait for a moment till the command windows to close.
4.Find in "testres.txt“ file under the same path of "ab.exe", the line "Requests per second: 914.29 [#/sec] (mean) " shows the result.
5.If there is any exception, it will be recorded in "errorlog.txt" under DirApp folder.