You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Felix Seeger <se...@sitewaerts.de> on 2003/06/17 17:55:35 UTC

[users@httpd] Performance problems with Apache2 under Solaris 9

Hi

I have compiled Apache httpd 2.0.46 under Solaris 9 on Netra T1 200 
(UltraSPARC-IIe) with gcc 2.95.3. Latest patch cluster from sun is installed.

The server works well, but when I download a zip file (for testing I use a 
500MB one) cpu usage jumps to 100%.
I only get between 300 and 800kb/s on my local net (100baseTx-FD)

On the sun the CPU states from top look like this:
CPU states:  0.0% idle,  0.0% user, 97.7% kernel,  2.3% iowait,  0.0% swap

iowait can jump up to 13% which results in a lower value for kernel.
user can go up to 3 or 7% which is used mainly by httpd and top.


If I do nothing the machine is 99%idle, the rest is used by top and the
sleeping httpd.

I don't have this problem when with the shipped apache 1.3, scp or local
disk copying. I also can't find errors in the system log, apache log or net 
stats.

Anyone knows something about that ?

thanks
have fun
Felix


#############
# This is what I get from "dio sd1 1":
#############

   br    |    bw    |  rkb/s |  wkb/s | %r:%w | ro | wo |  rq | %b |  wq |
%b |

   1048576          0   1024.0      0.0 100:0      1    0  0.03    3  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
   1048576          0   1024.0      0.0 100:0      1    0  0.03    3  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
   1048576          0   1024.0      0.0 100:0      1    0  0.02    2  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
   1048576          0   1024.0      0.0 100:0      1    0  0.03    3  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
   1048576          0   1024.0      0.0 100:0      1    0  0.03    3  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
   1048576          0   1024.0      0.0 100:0      1    0  0.03    3  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
   1048576          0   1024.0      0.0 100:0      1    0  0.03    3  0.00   
0
         0        512      0.0      0.5   0:100    0    1  0.01    1  0.00   
0
  10706944          0  10456.0      0.0 100:0     16    0  0.37   31  0.00   
0
   7340032          0   7168.0      0.0 100:0      7    0  0.20   20  0.00   
0
   6111232          0   5968.0      0.0 100:0      6    0  0.15   15  0.00   
0
   4374528          0   4272.0      0.0 100:0      6    0  0.14   14  0.00   
0
   4194304          0   4096.0      0.0 100:0      4    0  0.09    9  0.00   
0
   4194304          0   4096.0      0.0 100:0      4    0  0.11   11  0.00   
0
   1048576          0   1024.0      0.0 100:0      1    0  0.03    3  0.00   
0
   1048576          0   1024.0      0.0 100:0      1    0  0.02    2  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
   1048576          0   1024.0      0.0 100:0      1    0  0.03    3  0.00   
0
   7700480          0   7520.0      0.0 100:0     15    0  0.30   22  0.00   
0
   8388608          0   8192.0      0.0 100:0      8    0  0.23   23  0.00   
0
   5242880          0   5120.0      0.0 100:0      7    0  0.14   14  0.00   
0
   5242880          0   5120.0      0.0 100:0      5    0  0.14   14  0.00   
0
   4194304          0   4096.0      0.0 100:0      4    0  0.10   10  0.00   
0
   4194304          0   4096.0      0.0 100:0      4    0  0.11   11  0.00   
0
   3022848          0   2952.0      0.0 100:0      5    0  0.09    9  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
   1048576          0   1024.0      0.0 100:0      1    0  0.03    3  0.00   
0
         0          0      0.0      0.0   0:0      0    0  0.00    0  0.00   
0
   1048576          0   1024.0      0.0 100:0      2    0  0.09    4  0.00   
0


#############
# My configure script looks like this:
#############

# I also tried it without the --with-mpm/atomics params
./configure \
        --enable-rewrite=shared \
        --enable-proxy=shared \
        --enable-proxy_http=shared \
        --enable-proxy_connect=shared \
        --enable-mime_magic=shared \
        --enable-dav=shared \
        --enable-dav_fs=shared \
        --enable-ssl=shared \
        --enable-vhost_alias=shared \
        --enable-config_log=shared \
        --enable-negotiation=shared \
        --enable-autoindex=shared \
        --enable-dir=shared \
        --enable-cgi=shared \
        --enable-alias=shared \
        --enable-auth=shared \
        --enable-unique_id=shared \
        --enable-setenvif=shared \
        --enable-so \
        --enable-info \
        --with-mpm=leader --enable-nonportable-atomics=yes


#############
# "Short" httpd.conf (I removed comments/icons/docs...):
#############

<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
#LockFile logs/accept.lock
</IfModule>
</IfModule>

<IfModule !mpm_netware.c>
<IfModule !perchild.c>
#ScoreBoardFile logs/apache_runtime_status
</IfModule>
</IfModule>


<IfModule !mpm_netware.c>
PidFile logs/httpd.pid
</IfModule>

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

Listen 80

LoadModule auth_module modules/mod_auth.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so

<IfModule mod_dav.c>
  DAVLockDB /usr/local/apache2/var/DavLock
</IfModule>
ExtendedStatus On

<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
User web
Group web
</IfModule>
</IfModule>

ServerName sun
UseCanonicalName Off
DocumentRoot "/usr/local/apache2/htdocs"
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

UserDir public_html

DirectoryIndex index.html index.html.var
AccessFileName .htaccess
TypesConfig conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off

# also tried to turn mmap off
#EnableMMAP off

ServerTokens Full
ServerSignature On

IndexOptions FancyIndexing VersionSort

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddEncoding x-compress Z
AddEncoding x-gzip gz tgz

AddDefaultCharset ISO-8859-1

AddCharset ISO-8859-1  .iso8859-1  .latin1

AddHandler type-map var

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 172.16.10.88
</Location>

<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from 172.16.10.88
</Location>

<IfModule mod_ssl.c>
    Include conf/ssl.conf
</IfModule>

<IfModule mod_proxy.c>
    ProxyRequests on
    <Directory proxy:*>
      Order deny,allow
      #Deny from all
      #Allow from all
      AuthName "Login"
      AuthType Basic
      AuthUserFile /usr/local/apache2/conf/auth/users
      AuthGroupFile /usr/local/apache2/conf/auth/groups
      Require group sitewaerts
    </Directory>
    ProxyVia On
</IfModule>

# I download from this VH, disabling WebDav doesn't help
<VirtualHost 172.16.10.87>
    ServerName test.sun
    DocumentRoot /var/www
    ErrorLog /var/log/apache2/test-error_log
    CustomLog /var/log/apache2/test-access_log common
</VirtualHost>

<Directory /var/www>
  Options -Includes -ExecCGI +Indexes
  AllowOverride All
  DAV On
  DavDepthInfinity on
</Directory>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Performance problems with Apache2 under Solaris 9

Posted by Felix Seeger <se...@sitewaerts.de>.
Am Dienstag, 17. Juni 2003 18:00 schrieb Joshua Slive:
> On Tue, 17 Jun 2003, Felix Seeger wrote:
> > I have compiled Apache httpd 2.0.46 under Solaris 9 on Netra T1 200
> > (UltraSPARC-IIe) with gcc 2.95.3. Latest patch cluster from sun is
> > installed.
> >
> > The server works well, but when I download a zip file (for testing I use
> > a 500MB one) cpu usage jumps to 100%.
> > I only get between 300 and 800kb/s on my local net (100baseTx-FD)
> >
> > On the sun the CPU states from top look like this:
> > CPU states:  0.0% idle,  0.0% user, 97.7% kernel,  2.3% iowait,  0.0%
> > swap
>
> Obviously some sort of kernel issue, not directly to do with the apache
> source code.  A couple suggestions:
>
> Try using the EnableSendfile directive to disable the use of the
> sendfile() system call and see if that helps.
Ah, big thanks, now it works with 5-6MB/s and 20% kernel load.

> Try strace on an affected httpd to see what it is doing.
>
> Joshua.

Thanks again !
have fun
Felix 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Performance problems with Apache2 under Solaris 9

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 17 Jun 2003, Felix Seeger wrote:
> I have compiled Apache httpd 2.0.46 under Solaris 9 on Netra T1 200
> (UltraSPARC-IIe) with gcc 2.95.3. Latest patch cluster from sun is installed.
>
> The server works well, but when I download a zip file (for testing I use a
> 500MB one) cpu usage jumps to 100%.
> I only get between 300 and 800kb/s on my local net (100baseTx-FD)
>
> On the sun the CPU states from top look like this:
> CPU states:  0.0% idle,  0.0% user, 97.7% kernel,  2.3% iowait,  0.0% swap

Obviously some sort of kernel issue, not directly to do with the apache
source code.  A couple suggestions:

Try using the EnableSendfile directive to disable the use of the
sendfile() system call and see if that helps.

Try strace on an affected httpd to see what it is doing.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org