Thoughts about move work off the main squid thread to achieve parallelism

From: Ming Fu <Ming.Fu_at_watchguard.com>
Date: Mon, 7 Mar 2011 19:35:33 +0000

Hi,

My Name is Ming Fu. I have worked on squid on and off since 2000.

My current interesting is to improve the performance of squid 3.

What I am think of doing is to move the none cache-able processing off the main squid thread.

My assumption is the following:

1. significant portion of reply from web server are not cache-able.
2. Off load not cache-able processing off the main squid thread can save some CPU load from the main squid thread. This is similar to what is already happening on disk write and unlink.

Two approach I can think of:
1. move the processing of not cache-able reply to separate threads, these threads not need to access the cache.
2. Push the work down to the kernel's socket layer. Some kind of kernel filter that is able to associate two sockets and copy the in coming data from one socket to another. The squid establishes the association and provide information for the kernel filter to tell the end of a reply (chunked encoding or content-length). The kernel breaks the association when one reply is processed and squid regains the control of the sockets.

The option 2 could potentially be faster than option 1, but will be depends on the OS platform. I come from a BSD background, I have some confidence that this will be possible for FreeBSD.

Does my thoughts make sense?

Ming
Received on Mon Mar 07 2011 - 19:35:40 MST

This archive was generated by hypermail 2.2.0 : Tue Mar 08 2011 - 12:00:03 MST