Re: [squid-users] ACL Rules in memory

From: Denis Vlasenko <[email protected]>
Date: Wed, 23 Nov 2005 09:49:32 +0200

On Wednesday 23 November 2005 01:40, John Cougar wrote:
> Info,
>
> Are you looking to slow squid down to a grinding halt?? ACLs are in memory
> for a very good reason, and forcing Squid to go to Disk I/O for every access
> would give you ... less than desirable results, rest assured.

OSes started to cache file data in RAM many years ago:

# cat t.c
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

char buf[64*1024];

int main() {
    int i = 1000000;
    while (--i) {
        int fd = open("t.c", O_RDONLY);
        if (fd<0) return 1;
        read(fd, buf, sizeof(buf));
        close(fd);
    }
    return 0;
}
# gcc -Os t.c
# time ./a.out

real 0m7.057s
user 0m0.640s
sys 0m6.260s

In other words: my Celeron 1200 MHz just did more than 100000 open/read/close's
per 1 sec.

--
vda
Received on Wed Nov 23 2005 - 00:50:15 MST

This archive was generated by hypermail pre-2.1.9 : Thu Dec 01 2005 - 12:00:10 MST