Discussion:
Apache poor performance on Solaris 11.2 x86_64
(too old to reply)
b***@gmail.com
2014-11-17 12:43:00 UTC
Permalink
Hello!
I run on VMWare Solaris 11 and FreeBSD 7


SunOS host.host 5.11 11.2 i86pc i386 i86pcSystem = SunOS
Node = host.host
Release = 5.11
KernelID = 11.2
Machine = i86pc
Origin# = 1
NumCPU = 4


FreeBSD cache-02
7.1-RELEASE FreeBSD
amd64 amd64 GENERIC

Freebsd has 1CPU and 2G ram, Solaris 2CPU/2cores each and 8G ram

The main issue that we want to get rid of BSD, and i`am transferring service from bsd to solaris (web, sql).

But i very disappointed with measured results of the Apache performance.

========================== cut solaris bench ==============================
ab -c 5 -t 60 http://127.0.0.1/

This is ApacheBench, Version 2.3 <$Revision: 655654 $>

Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/

Licensed to The Apache Software Foundation, http://www.apache.org/



Benchmarking 127.0.0.1 (be patient)

Completed 5000 requests

Completed 10000 requests

Finished 12428 requests


Server Software: Apache/2.4.10
Server Hostname: 127.0.0.1
Server Port: 80

Document Path: /
Document Length: 45 bytes


Concurrency Level: 5
Time taken for tests: 60.043 seconds
Complete requests: 12428
Failed requests: 0
Write errors: 0
Total transferred: 3778112 bytes
HTML transferred: 559260 bytes
Requests per second: 206.98 [#/sec] (mean)
Time per request: 24.157 [ms] (mean)
Time per request: 4.831 [ms] (mean, across all concurrent requests)
Transfer rate: 61.45 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 20 137.0 0 1154
Processing: 0 4 5.1 1 30
Waiting: 0 2 3.9 0 20
Total: 0 24 136.7 9 1156



Percentage of the requests served within a certain time (ms)
50% 9
66% 10
75% 10
80% 10
90% 20
95% 20
98% 30
99% 1138
100% 1156 (longest request)
========================== cut solaris bench ==============================

========================== freebsd solaris bench ==============================
ab -c 5 -t 60 http://127.0.0.1/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Benchmarking 127.0.0.1 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests

Server Software: Apache/2.2.19
Server Hostname: 127.0.0.1
Server Port: 80

Document Path: /
Document Length: 44 bytes

Concurrency Level: 5
Time taken for tests: 20.575 seconds
Complete requests: 50000
Failed requests: 0
Write errors: 0
Total transferred: 18200000 bytes
HTML transferred: 2200000 bytes
Requests per second: 2430.18 [#/sec] (mean)
Time per request: 2.057 [ms] (mean)
Time per request: 0.411 [ms] (mean, across all concurrent requests)
Transfer rate: 863.85 [Kbytes/sec] received



Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 11
Processing: 0 2 8.4 2 301
Waiting: 0 1 6.5 1 297
Total: 0 2 8.4 2 301

Percentage of the requests served within a certain time (ms)

50% 2
66% 2
75% 2
80% 2
90% 2
95% 2
98% 2
99% 2
100% 301 (longest request)
========================== freebsd solaris bench ==============================

I have tried the built in Apache 2.2 - no luck, tried to build from source using open studio or gcc, no increase. Might there are some sort of system settings ? With so poor performance i can not use Solaris for my tasks. Btw the same bench results are on Solaris 11.0
b***@gmail.com
2014-11-21 05:49:02 UTC
Permalink
it seems to me that i`am close to find out what is wrong..


On clean solaris 11.2 when i run


ab -c 50 -n 3000 http://localhost/
Concurrency Level: 50

Time taken for tests: 2.898152 seconds
Complete requests: 3000
Failed requests: 0
Write errors: 0
Total transferred: 888835 bytes
HTML transferred: 135585 bytes
Requests per second: 1035.14 [#/sec] (mean)
Time per request: 48.303 [ms] (mean)
Time per request: 0.966 [ms] (mean, across all concurrent requests)
Transfer rate: 299.50 [Kbytes/sec] received
Connection Times (ms) min mean [+/-sd] median max
Connect: 0 7 19.3 2 119
Processing: 7 40 92.9 10 490
Waiting: 6 35 83.2 9 439
Total: 10 47 107.2 11 584






and when i run

ab -c 50 -n 3000 -k http://localhost/

Concurrency Level: 50

Time taken for tests: 0.415655 seconds
Complete requests: 3000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 2974
Total transferred: 996168 bytes
HTML transferred: 135180 bytes
Requests per second: 7217.52 [#/sec] (mean)
Time per request: 6.928 [ms] (mean)
Time per request: 0.139 [ms] (mean, across all concurrent requests)
Transfer rate: 2338.48 [Kbytes/sec] received


Connection Times (ms) min mean +/-sd median max
Connect: 0 0 0.2 0 3
Processing: 0 3 24.8 1 405
Waiting: 0 3 24.8 1 405
Total: 0 3 24.9 1 406





-k
Use HTTP KeepAlive feature



what part of TCP to tune to fix this issue ?
C.
2015-03-14 22:12:31 UTC
Permalink
Post by b***@gmail.com
The main issue that we want to get rid of BSD, and i`am transferring service from bsd to solaris (web, sql).
Why? Not that there's anything intrinsically wrong with Solaris, but IMHO its not a good fit for webserving.
Post by b***@gmail.com
But i very disappointed with measured results of the Apache performance.
Yup.
Post by b***@gmail.com
ab -c 5 -t 60 http://127.0.0.1/ (solaris)
Time per request: 24.157 [ms] (mean)
ab -c 5 -t 60 http://127.0.0.1/ (BSD)
Time per request: 2.057 [ms] (mean)
ab -c 50 -n 3000 -k http://localhost/ (solaris)
Time per request: 6.928 [ms] (mean)
So you've got a 20msec overhead on Solaris establishing a connection. I'm guessing you might be trying to run the pre-fork version of Apache - bad idea. But even if you can reduce this overhead, Solaris is still more than 3 times slower than BSD running on 4 times the number of CPUs and 4 times the amount of memory.

You can reduce the pain a bit by tuning Apache - but not much. (Will this server really be getting all its traffic from localhost?)

C.
b***@gmail.com
2015-07-10 08:04:40 UTC
Permalink
Post by C.
Post by b***@gmail.com
The main issue that we want to get rid of BSD, and i`am transferring service from bsd to solaris (web, sql).
Why? Not that there's anything intrinsically wrong with Solaris, but IMHO its not a good fit for webserving.
Post by b***@gmail.com
But i very disappointed with measured results of the Apache performance.
Yup.
Post by b***@gmail.com
ab -c 5 -t 60 http://127.0.0.1/ (solaris)
Time per request: 24.157 [ms] (mean)
ab -c 5 -t 60 http://127.0.0.1/ (BSD)
Time per request: 2.057 [ms] (mean)
ab -c 50 -n 3000 -k http://localhost/ (solaris)
Time per request: 6.928 [ms] (mean)
So you've got a 20msec overhead on Solaris establishing a connection. I'm guessing you might be trying to run the pre-fork version of Apache - bad idea. But even if you can reduce this overhead, Solaris is still more than 3 times slower than BSD running on 4 times the number of CPUs and 4 times the amount of memory.
You can reduce the pain a bit by tuning Apache - but not much. (Will this server really be getting all its traffic from localhost?)
C.
I`ve changed it to worker. Well the main issue that i personally do not like is that that when i run benchmark on solaris localhost i get bad results, but if ab it from another pc or VM`s it is okay.

Why keepalive flag so dramatically affect the performance ?

Loading...