Problems under load? [message #4169] |
Wed, 17 July 2002 15:45 |
ctbk
Messages: 142 Registered: April 2002 Location: Milan, Italy
Karma: 0
|
Senior Member |
|
|
I've installed a copy of Fudforum (2.2.0) and I've filled the DB to make some test the behaviour of fud under load.
I'm using autobench, which is just a script calling httperf.
A part from the fact that time taken to create a page grows in an exponential way when increasing (linarly) the number of simultaneous connections (but I suspect it's a mysql issue...)
I've noticed that when the simultaneous connections are 8 or more the forum stops working and I get this error message:
query failed: %( INSERT INTO fud2_ses (ses_id,time_sec,data,sys_id,user_id) VALUES('114d6f32b8d784b7e43c495c88cc5022',1026919930,'', 'e7e6f93e3004e84599e5607ce4b8d58d',2000013715) )% because %( Duplicate entry '2000013715' for key 2 )%
To try to stress the forum the URL I keep calling refers to a thread with 50 replies or so.
When I stop autobench, the forum returns to normality and works again.
Regarding the growth of pages' creation time, here it's the trend I've noticed:
2 req/sec ~ 200ms
4 req/sec ~1200ms
6 req/sec ~2500ms
8 req/sec ~4300ms
10 req/sec ~8300ms
My server is using Linux 2.4.4 (quite old indeed) and MySQL 3.23.42
Later,
Ste
~
~
:wq
|
|
|
|
Re: Problems under load? [message #4207 is a reply to message #4169] |
Thu, 18 July 2002 08:10 |
ctbk
Messages: 142 Registered: April 2002 Location: Milan, Italy
Karma: 0
|
Senior Member |
|
|
I don't use httperf directly, autobench invokes httperf various times in a row with growing values of connections per second. Anyway here is the line:
httperf --server my.server --uri /thread/s/uri --num-conn 400 --rate from2to30-step2 --call 1
nothing special really.
The nice thing about autobench is that results are given in a csv file, and you can import them in OpenOffice Calc to draw a graph of performances...
Anyway, I'll upgrade my fud and repeat the tests : )
Thanx,
Ste
~
~
:wq
|
|
|
Re: Problems under load? [message #4208 is a reply to message #4207] |
Thu, 18 July 2002 11:32 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Thanks for the info:
I've used
httperf --server server --uri path_to_forum --num-conn 400 --rate RATE
to test the speed of the forum via a local lan (this way there is no penalty for network traffic. The lan itself is 100mbit and realistically can push about 10 megs per second.
The test was executed from 1Ghz celeron and the forum is running on a dual Celeron 500 System (66Mhz bus). The actual 'server' is pretty substandard machine as far as modern computers go, just about any system you can buy is 3-3.5 times more powerful.
Here is the result of my tests:
Request rate: 2.0 req/s (499.3 ms/req)
Request rate: 4.0 req/s (249.7 ms/req)
Request rate: 8.0 req/s (125.0 ms/req)
Request rate: 10.0 req/s (100.2 ms/req)
Request rate: 12.0 req/s (83.6 ms/req)
Request rate: 12.9 req/s (77.7 ms/req) (requested rate of 14)**
Request rate: 12.8 req/s (78.0 ms/req) (requested rate of 16)**
I was testing this on a thread view page, which is quite expensive. This is also a slightly unfair test since each request comes as a new anonymous users, so internally there is a small MySQL lock the forum has to do when creating a session for that user. If the incoming connection was a registered user or cookied anon user the process would have been much faster.
As you can see the sweet spot on my box is ~13 requests per seconds. Above that the ms/req begins to rise instead of dropping like before.
FUDforum Core Developer
|
|
|
Re: Problems under load? [message #4236 is a reply to message #4208] |
Fri, 19 July 2002 08:42 |
ctbk
Messages: 142 Registered: April 2002 Location: Milan, Italy
Karma: 0
|
Senior Member |
|
|
I didn't experience the 'dropping' of reply time you reported...
Don't know if it's a DB related thing (I use persistent connection and access through socket).
I've tested the 2.2.3 with a big db of user (~9000) and messages (~118.000).
I ran 2 tests: anonymous generation of the first page of a big thread (>70 msgs) and generation of a small thread (7 messages).
My machine is a dual PIII 1000 with 512MB RAM, connected in a 100Mb LAN. MySQL 3.23.42, Linux 2.4.18 .
Here are the results:
TEST 1: BIG Thread:
Req/sec Mean Reply Time (ms)
1 111
2 111
4 111
6 111
8 112
10 120
12 126
14 500
16 3700
18 6000
20 8000
I think that up to 15/16 conn/sec the wait is acceptable.
TEST 2: SMALL Thread
Req/sec Mean Reply Time (ms)
2 67
4 67
... 67
14 67
16 71
18 74
20 74
22 76
24 606
26 1300
28 1900
30 2447
32 2600
34 3278
36 4578
38 5036
Of course the thread pages are the most expensive to generate.
Assuming that one user (being pessimistic) requests 1 page every 15 seconds, and supposing all the threads are BIG... I calculated the following:
req/sec = (# users) * 1/15 (pages/sec)
If we assume 16 req/sec this means 240 CONTEMPORARY browsing users... but considering that not all the threads are so big, not all users are anonymous and not every request is relative to a thread page (from my experience the ratio threadpage/notthreadpage is 1/1, meaning that for every thread page there's one request relative to a not-thread page) I think the number can be much higher, let's say (on my HW) 300/350 users at the same time browsing and posting in the forum with acceptable waiting times.
Not bad
Later,
Ste
~
~
:wq
[Updated on: Fri, 19 July 2002 09:13] Report message to a moderator
|
|
|
Re: Problems under load? [message #4512 is a reply to message #4236] |
Mon, 29 July 2002 20:00 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
If you want even more speed out of your forum or any web PHP applications you may want to give http://www.php-accelerator.co.uk/ a try.
It is a free PHP accelerator, version 1.3.2 came out today without the annoying activation that it had before.
On my test system this extension allowed my poor celeron to move from 12.8 req/s to 17.5 req/s, approximately 35% boost in speed.
FUDforum Core Developer
|
|
|
Re: Problems under load? [message #4542 is a reply to message #4512] |
Tue, 30 July 2002 07:05 |
ctbk
Messages: 142 Registered: April 2002 Location: Milan, Italy
Karma: 0
|
Senior Member |
|
|
Last time I forgot to tell you, on my webserver I use php_apc as Zend engine.
Don't know if php-accelerator is better or not. Have you (or someone else) done a comparison between accelerators?
Later,
Ste
~
~
:wq
|
|
|
Re: Problems under load? [message #4546 is a reply to message #4542] |
Tue, 30 July 2002 11:23 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
I've used APC cache, however PHPA is much closer in performance gains then APC to the Zend Cache.
There are some benchmarks comparing APC/PHPA/Zend on PHPA's website, I belive smarty templating system was used as the benchmark's case.
FUDforum Core Developer
|
|
|