Recent

Author Topic: FreeSpider performance test  (Read 16809 times)

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
FreeSpider performance test
« on: April 16, 2010, 09:04:51 am »
Hello.
Since yesterday I was doing a performance test for FreeSpider CGI web application.
Results was surprised me:

2500 requests per minute for FreeSpider application with FireBird (Two operations read and update)
6600 requests per minute for FreeSpider application without database.

This is mean something for FreeSpider, Lazarus, and native compiled CGI application.

Your can see detail test results here: http://code.sd/freespider/fsperformance.htm

Motaz
« Last Edit: May 29, 2012, 08:08:57 am by motaz »

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: FreeSpider performance test
« Reply #1 on: April 17, 2010, 01:41:06 pm »
I do not know about web sites, but can I use FreeSpider as Apache module instead of CGI?

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider performance test
« Reply #2 on: April 17, 2010, 02:30:15 pm »
yes, you can use it to create Web Application the same as PHP and Perl CGI.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12566
  • FPC developer.
Re: FreeSpider performance test
« Reply #3 on: April 17, 2010, 07:00:36 pm »
Isn't this normal?  DBs (specially when they are on anther machine) have quite some latency.

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider performance test
« Reply #4 on: April 18, 2010, 08:28:49 am »
No, I mean it is too fast that I was expected. I was expecting that this CGI web application could handle about 100 to 200 users (Employees), but now after the performance test I realized that it could handle about 2500 active users (that send requests on an average of every 1 minute)

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider performance test
« Reply #5 on: April 18, 2010, 08:30:58 am »
Now after these performance results I could write any huge web application with more confidence.
Before this test I was thinking to add ISAPI/ or .so (Apache extension) for shared code, to reduce memory consumption and faster response. But it seems that we will stuck on the performance of the database, specially when it is outside web server. So that there may be a little difference between ISAPI and CGI
« Last Edit: April 18, 2010, 08:36:20 am by motaz »

jarto

  • Full Member
  • ***
  • Posts: 106
Re: FreeSpider performance test
« Reply #6 on: April 18, 2010, 09:57:37 am »
Keep in mind that performance usually suffers quite a bit when the web server and the database gets hit with many simultaneous requests. I suppose these httperf-requests were sequential?

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider performance test
« Reply #7 on: April 18, 2010, 10:27:44 am »
Yes, may be the Apache server, or httper tester do not send all requests at the same time, may be the Apache is doing some queuing mechanism.
May be because of update command. When I change it to query database only, it was more faster.
Luckily update actions are very few compared with query for normal database systems.

jarto

  • Full Member
  • ***
  • Posts: 106
Re: FreeSpider performance test
« Reply #8 on: April 18, 2010, 01:49:05 pm »
I guess I didn't explain myself well enough. My comment was mainly on your estimations of how many active users you can handle. I'm pretty sure httperf does all those 2500 requests sequentially. Apache doesn't have to queue anything and at no point are there multiple threads fighting (and waiting) for the same resource. No locks are slowing you down.

Things change quite a bit when many threads are running at the same time. That will happen if you have 2500 users. At that point you may notice, that one run doesn't take 0.05 seconds any more. It starts to take 0,5 seconds, 2 seconds, even more. And as the running time gets longer, the number of simultaneous threads increases, making the situation quickly worse. Rush hour slows things down on the information highway as well as the real highway :)

Can you try this: Run two simultaneous long httperf runs from two terminals. When these two are running, run a third, shorter httperf run and check, how fast that third one is.

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider performance test
« Reply #9 on: April 18, 2010, 01:55:51 pm »
I have selected 2500 connections in httper to get these results:

httperf --client=0/1 --server=localhost --port=80 --uri=http://localhost/cgi-bin/news/detail?id=-22 --send-buffer=4096 --recv-buffer=16384 --num-conns=2500 --num-calls=1

request rate was 39 request per second:

Request rate: 39.7 req/s (25.2 ms/req)

So that average concurrent connections was 39, I suppose.



jarto

  • Full Member
  • ***
  • Posts: 106
Re: FreeSpider performance test
« Reply #10 on: April 18, 2010, 02:25:31 pm »

So that average concurrent connections was 39, I suppose.


I believe you only had one concurrent connection:

Connection rate: 39.7 conn/s (25.2 ms/conn, <=1 concurrent connections)

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider performance test
« Reply #11 on: April 18, 2010, 02:35:41 pm »
Ok, I'll do the test again and I'll run many instances of httper to make sure that there are many concurrent connections.

jarto

  • Full Member
  • ***
  • Posts: 106
Re: FreeSpider performance test
« Reply #12 on: April 18, 2010, 02:54:13 pm »
Apparently you can also define the rate at which httperf sends requests:

http://www.hpl.hp.com/research/linux/httperf/wisp98/html/doc003.html

motaz

  • Sr. Member
  • ****
  • Posts: 495
    • http://code.sd
Re: FreeSpider performance test
« Reply #13 on: April 18, 2010, 04:01:51 pm »
Ok, but now I'll show you the results that I get when I run 10 instances of httper at the same time:

it becomes worse for firebird, but better for non database freeSpider web application.

Prevously CPU Load reaches 60% to 70% in the server
now it reaches 100% when using 10 instances for the server

I removed the update procedure and keep query.

new test with firebird can handle only 1000 requests per minute
for non database web application it reaches 7300 request per minute

This is the log of one instance of 10 for Firebird connection:

Code: [Select]
Total: connections 100 requests 100 replies 100 test-duration 61.880 s

Connection rate: 1.6 conn/s (618.8 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 98.0 avg 618.8 max 2424.0 median 497.5 stddev 440.5
Connection time [ms]: connect 63.7
Connection length [replies/conn]: 1.000

Request rate: 1.6 req/s (618.8 ms/req)
Request size [B]: 104.0

Reply rate [replies/s]: min 1.0 avg 1.6 max 3.2 stddev 0.7 (12 samples)
Reply time [ms]: response 555.1 transfer 0.0
Reply size [B]: header 158.0 content 2734.0 footer 0.0 (total 2892.0)
Reply status: 1xx=0 2xx=100 3xx=0 4xx=0 5xx=0

CPU time [s]: user 2.40 system 9.72 (user 3.9% system 15.7% total 19.6%)
Net I/O: 4.7 KB/s (0.0*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0


jarto

  • Full Member
  • ***
  • Posts: 106
Re: FreeSpider performance test
« Reply #14 on: April 19, 2010, 03:14:37 pm »
7300 requests per minute under some serious load is not bad at all for a cgi-bin.

 

TinyPortal © 2005-2018