Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Nov 2001 22:30:47 +0000
From:      John Ekins <jre@globalnet.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   thttpd with php on FreeBSD compared with Linux
Message-ID:  <3BE1CD17.57006E87@globalnet.co.uk>

next in thread | raw e-mail | index | archive | help
Hello,
I believe this is the right list for this sort of question, other I
apologise and am happy to be directed elsewhere.

I am comparing FreeBSD with Linux for running thttpd with php. The test
server is a dual processor PIII 550MHz with 512MB RAM. The FreeBSD version
is 4.4 Release (with SMP kernel) and soft updates enabled, the Linux
version Redhat 7.2 (SMP) with ext3. The page I'm testing just contains <?
phpinfo(); ?> which will be familiar to anyone who runs php.

I used ab (ab -n 5000 -c 10 http://spooky/) which comes with Apache to do
the test and here's what I saw:

FreeBSD:

Finished 5000 requests
Server Software:
Server Hostname:        spooky
Server Port:            80

Document Path:          /
Document Length:        32589 bytes

Concurrency Level:      10
Time taken for tests:   104.921 seconds
Complete requests:      5000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      163200000 bytes
HTML transferred:       162945000 bytes
Requests per second:    47.65 [#/sec] (mean)
Time per request:       209.84 [ms] (mean)
Time per request:       20.98 [ms] (mean, across all concurrent requests)
Transfer rate:          1555.46 [Kbytes/sec] received
-----

Linux:

Finished 5000 requests
Server Software:                                                           
Server Hostname:        spooky
Server Port:            80

Document Path:          /
Document Length:        31535 bytes

Concurrency Level:      10
Time taken for tests:   62.436 seconds
Complete requests:      5000
Failed requests:        0
Broken pipe errors:     0
Total transferred:      157930000 bytes
HTML transferred:       157675000 bytes
Requests per second:    80.08 [#/sec] (mean)
Time per request:       124.87 [ms] (mean)
Time per request:       12.49 [ms] (mean, across all concurrent requests)
Transfer rate:          2529.47 [Kbytes/sec] received
-----

That is quite some difference. The file system shouldn't have much impact,
and thttpd is single threaded, single process so SMP shouldn't make any
difference as I far as I know.

Can anyone offer comments as to why there is such a big difference, and
suggestions on how to improve this?

Thanks,
John.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BE1CD17.57006E87>