Search squid archive

Re: ACL Rules in memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux