Messages in this thread | | | From | "Amsden, Zachary" <> | Subject | RE: Thread implementations... | Date | Thu, 25 Jun 1998 11:05:25 -0400 |
| |
Possibly. But according to Squid's own doc, the primary problems in Squid performance are
1) Not enough memory 2) Too slow disks
which as far as I can see aren't helped by sendfile. They also say "CPU limitations are rarely encountered except in very large caches". The same doc describes how to use clusters for large caches.
But too slow disks and not enough memory are directly related problems. If the kernel has frequently used disk files in the buffer cache, it still needs to copy the data to the user space server, then copy it back out onto a socket. With sendfile(), it can directly send data from the buffer cache without any user space involvement. In addition, we no longer need user space buffers in the server, cutting down on useless "memory duplication", allowing for more buffer cache.
With sendfile and a length parameter, user space need only get involved when it needs to inject data into or modify data going through an fd stream, which practically eliminates the need for any user space buffers. This will help just about any task I can think of.
Zach Amsden amsden@andrew.cmu.edu
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |