Do you use KeepAlive?

Do you use KeepAlive?

Post by Bill Mosele » Thu, 09 Dec 1999 04:00:00



Do most people enable Apache KeepAlive?  Are there reasons not to enable
it?

--

pls note the one line sig, not counting this one.

 
 
 

Do you use KeepAlive?

Post by Ri?ardas ?epa » Fri, 10 Dec 1999 04:00:00


On Wed Dec  8 14:23:16 1999 -0800
           (Ketvirtadienis, 1999 m. gruod?io  9 d. 00:23:16 EET),

Quote:> Do most people enable Apache KeepAlive?  Are there reasons not to enable
> it?

        There are reasons - if you enable it httpd processes wait for
next request, do nothing and take memory most of the time.

--

                                      Ri?ardas ?epas
~~
~

  application_pgp-signature_part
< 1K Download

 
 
 

Do you use KeepAlive?

Post by Andrei Ivan » Fri, 10 Dec 1999 04:00:00



> On Wed Dec  8 14:23:16 1999 -0800

>> Do most people enable Apache KeepAlive?  Are there reasons not to enable
>> it?
>    There are reasons - if you enable it httpd processes wait for
> next request, do nothing and take memory most of the time.

But if you'd go w/out KeepAlive's, the client will need to open new
TCP connection (3-way handshake, you know it) for each document (even
small inline gifs) served by your server!

--
andrei

 
 
 

Do you use KeepAlive?

Post by Bill Mosele » Fri, 10 Dec 1999 04:00:00




> > On Wed Dec  8 14:23:16 1999 -0800

> >> Do most people enable Apache KeepAlive?  Are there reasons not to enable
> >> it?
> >       There are reasons - if you enable it httpd processes wait for
> > next request, do nothing and take memory most of the time.

> But if you'd go w/out KeepAlive's, the client will need to open new
> TCP connection (3-way handshake, you know it) for each document (even
> small inline gifs) served by your server!

The default KeepAliveTimeout is 15 seconds.  Would it be smart to make
that more like 5 seconds?  That way the process wouldn't be*
around that long using up memory.

I guess the answer would be to try it and see if, on average, fewer or
more processes are needed.  That's hard to measure with un predictable
loads.  Any better ways to measure?

--

pls note the one line sig, not counting this one.

 
 
 

Do you use KeepAlive?

Post by Ri?ardas ?epa » Sat, 11 Dec 1999 04:00:00


On Thu Dec  9 05:27:25 1999 -0800
           (Ketvirtadienis, 1999 m. gruod?io  9 d. 15:27:25 EET),



> > > On Wed Dec  8 14:23:16 1999 -0800

> > >> Do most people enable Apache KeepAlive?  Are there reasons not to enable
> > >> it?
> > >  There are reasons - if you enable it httpd processes wait for
> > > next request, do nothing and take memory most of the time.

> > But if you'd go w/out KeepAlive's, the client will need to open new
> > TCP connection (3-way handshake, you know it) for each document (even
> > small inline gifs) served by your server!

> The default KeepAliveTimeout is 15 seconds.  Would it be smart to make
> that more like 5 seconds?  That way the process wouldn't be*
> around that long using up memory.

> I guess the answer would be to try it and see if, on average, fewer or
> more processes are needed.  That's hard to measure with un predictable
> loads.  Any better ways to measure?

        Look at apache-status page and you will see how many processes
are waiting for particular timeout. If your server isn't very busy and you can afford more memory
it will help your users a bit. Reducing count and size of distinct images will help even more ;)

        Cheers,
        Richard.
--

                                      Ri?ardas ?epas
~~
~

  application_pgp-signature_part
< 1K Download
 
 
 

1. Trouble using setsockopt() to set TCP keepalive params under Linux

I am trying to set TCP keepalive parameters under Linux 2.2.18 using
the following function:

int keepalive(int fd, int keepidle, int keepintvl, int nkeep)
{
    int  on = 1,
         _keepidle = keepidle,
         _keepintvl = keepintvl,
         _nkeep = nkeep;

    if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof on) < 0)
            return (-1);

    if (setsockopt(fd, SOL_TCP, TCP_KEEPIDLE, &_keepidle,
sizeof(int))<0)
            return (-1);

    if (setsockopt(fd, SOL_TCP, TCP_KEEPINTVL, &_keepintvl,
sizeof(int))<0)
            return (-1);

    if (setsockopt(fd, SOL_TCP, TCP_KEEPCNT, &_nkeep, sizeof(int)) <
0)
            return (-1);

    return 0;

This function is being called as follows:

    fd = socket(AF_INET, SOCK_STREAM, 0);
    if (fd < 0) {
            ...
    }

    if (keepalive(fd, 10, 1, 1) < 0) {
            ...
    }

The problem is that within my keepalive() function, the calls to
setsockopt() that try to set the TCP keepalive parameters fail with
errno = 92(ENOPROTOOPT). Looking at /usr/src/linux/net/ipv4/tcp.c,
these parameters seem to be supported. What I am doing wrong? Any help
would be greatly appreciated.

2. gcc-2.7.2.2: cannot find "libgcc.a"

3. Apache reverse proxy does not communicate with web apps using HTTP 1.1 keepalive

4. 3Com 3c575 PCMCIA Cardbus NIC

5. Keepalive using tcp/ip

6. Samba - broken pipes - out of the blue

7. HELP: Connectivity between DOS/DOS and DOS/Linux

8. LinuxPPC problem and Firmware Update?

9. using nlist(), not nlist64(), in SunOS5.7_64-bit ... can it be done ???

10. Working from or using DOS drivers under Linux

11. using btrieve requestor in linux dos box

12. Using a 1.2M 5.25" floppy drive with AIX/PS2 and DOS Merge

13. Using the dos version of dd...