Re: [squid-users] Socket option in Squid

From: Adrian Chadd <adrian@dont-contact.us>
Date: Fri, 17 Aug 2001 12:21:14 -0600

On Fri, Aug 17, 2001, Ronald wrote:
> Hello Henrik,
>
> I am reading Squid code. My squid 24s1 is becoming bottleneck in cpu usage, found that most of the cpu was with poll calls. I have read this from one book that we can set SO_SNDLOWAT socket option to high value so that we can reduce the number of read calls. Does this make sense?

yup. At high connection/data rates this happens.
I thought SNDLOWAT set the hard watermark - ie if the incoming
data doesn't ever exceed the watermark, it never becomes ready
for reading/writing.

The squid IO model needs tobe reworked. I've been trying on and off for
a year to rework the existing codebase but from what I have learnt
it'd be a lot easier to start from the beginning again (at least from
the storage/client/server code.)

I'm quite happy to write up a paper on this if people would like.
But I'm sure its been covered in the squid-users/squid-dev archives
since around 1999.

> And another thing, I have seen in cachemgr that no of counters for select is such and such. Is there any calculation to check whether Squid is in Normal state like No of requests Vs No of poll calls, etc, etc ????
>
> Again, What are the issues when we make Squid as a forking a child process per request? Will it not be suitable for Squid?
>
>

The trouble with child per connection is that the process overhead
in the operating system actually becomes a serious limitation at more
than a few tens of requests per second. UNIX wasn't built to have
high process churn rates. If you don't believe me, take a look
at apache. In fact, you can run apache in proxy mode.. :)

Adrian
Received on Fri Aug 17 2001 - 12:21:15 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:42 MST