You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Senthil Nathan <rs...@gmail.com> on 2005/11/24 16:39:39 UTC

[users@httpd] need help on improving apache server performance

hi all,

i would like to improve the apache server performance.
its dead slow. its downloading the images again and again from the server
and makes it very slow.

then i googled and found some interesting stuff like this,
-----------------------------------------------------------------------------
ExpiresActive On
ExpiresDefault "access plus 300 seconds"

<Directory "/cgi-bin/higui>
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    ExpiresByType text/html "access plus 1 day"
    ExpiresByType text/css "access plus 1 day"
    ExpiresByType text/javascript "access plus 1 day"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
</Directory>
------------------------------------------------------------------------------

after using this stuff in the httpd.conf file, i see that its faster,
but still the requests to the server are not made to run some of the cgi
scripts.
its fetching the data from the cache instead of the server.

so, in general i need to cache the images and also the cgi scripts run on
the client has to be faster.

how should i do this???

thanks
senthil

Re: [users@httpd] need help on improving apache server performance

Posted by Joshua Slive <js...@gmail.com>.
On 11/24/05, Senthil Nathan <rs...@gmail.com> wrote:
> hi joshua,
> right, it is /opt/hiweb/server/cgi-bin/higui
>
> and ok anyway cgi scripts running on the server.
> but i want the images to cached and the client has to be faster,
> in general. any request to the server has to be made properly
> and fetch the data from the server not from the cache.

Well, start  by fixing your config to use the correct <Directory> location.

But if you never want the cgi cached, then you shouldn't be putting
one-day-ahead expires headers on all html.  You should be using

<FilesMatch \.cgi$>
Header add Cache-Control no-cache
Header add Vary *
</FilesMatch>
or something like that.

As far as speeding up the CGI script, that is really a programming
question more than an apache config question.  Since we know nothing
about the program, we can't really help.  (Unless the problem is
simply the time taken to fork the process, in which case something
like fastcgi might help.)

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


Re: [users@httpd] need help on improving apache server performance

Posted by Senthil Nathan <rs...@gmail.com>.
hi joshua,
right, it is /opt/hiweb/server/cgi-bin/higui

and ok anyway cgi scripts running on the server.
but i want the images to cached and the client has to be faster,
in general. any request to the server has to be made properly
and fetch the data from the server not from the cache.

hope i made it clear.

thanks
rsennat

On 11/24/05, Joshua Slive <js...@gmail.com> wrote:
>
> On 11/24/05, Senthil Nathan <rs...@gmail.com> wrote:
> > hi all,
> >
> > i would like to improve the apache server performance.
> > its dead slow. its downloading the images again and again from the
> server
> > and makes it very slow.
> >
> > then i googled and found some interesting stuff like this,
> >
> -----------------------------------------------------------------------------
> > ExpiresActive On
> > ExpiresDefault "access plus 300 seconds"
> >
> > <Directory "/cgi-bin/higui>
>
> Do you really have a /cgi-bin/ directory off the root of your
> filesystem?  I doubt it.  You probably want <Directory
> /usr/local/apache2/cgi-bin/higui> or something like that.
>
> > after using this stuff in the httpd.conf file, i see that its faster,
> > but still the requests to the server are not made to run some of the cgi
> > scripts.
> > its fetching the data from the cache instead of the server.
> >
> > so, in general i need to cache the images and also the cgi scripts run
> on
> > the client has to be faster.
>
> Very confusing question.  I really don't understand what you want.
>
> CGI scripts are not run on the client, they are run on the server.
> The decision on whether to serve from the cache or not is made by the
> client.  The server can simply give the client advice.
>
> Perhaps if you gave an example of a specific URL that you are having a
> problem with and explain how you would like it to behave and how it is
> actually behaving.
>
> 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
>
>

Re: [users@httpd] need help on improving apache server performance

Posted by Joshua Slive <js...@gmail.com>.
On 11/24/05, Senthil Nathan <rs...@gmail.com> wrote:
> hi all,
>
> i would like to improve the apache server performance.
> its dead slow. its downloading the images again and again from the server
> and makes it very slow.
>
> then i googled and found some interesting stuff like this,
> -----------------------------------------------------------------------------
> ExpiresActive On
> ExpiresDefault "access plus 300 seconds"
>
> <Directory "/cgi-bin/higui>

Do you really have a /cgi-bin/ directory off the root of your
filesystem?  I doubt it.  You probably want <Directory
/usr/local/apache2/cgi-bin/higui> or something like that.

> after using this stuff in the httpd.conf file, i see that its faster,
> but still the requests to the server are not made to run some of the cgi
> scripts.
> its fetching the data from the cache instead of the server.
>
> so, in general i need to cache the images and also the cgi scripts run on
> the client has to be faster.

Very confusing question.  I really don't understand what you want.

CGI scripts are not run on the client, they are run on the server. 
The decision on whether to serve from the cache or not is made by the
client.  The server can simply give the client advice.

Perhaps if you gave an example of a specific URL that you are having a
problem with and explain how you would like it to behave and how it is
actually behaving.

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