Comments inline:
Dave Raven wrote:
> Thanks for the reply, but I have a few responses. (Only to the FreeBSD side
> of the FAQ)
>
> kern.maxfiles=65536
> kern.maxfilesperproc=32768
> [root@storm] /mnt/cache # sysctl -a kern.maxfiles && sysctl -a
> kern.maxfilesperproc
> kern.maxfiles: 65536
> kern.maxfilesperproc: 32768
> [root@opteq] /mnt/cache # pstat -T
> 84/65536 files
>
> We can see there are definately 65536 files available...
> (note the cache was not running hence the 84)
>
> the maximum setting advisable is probably about that without causing
> yourself too much
> trouble. However, that is what my freebsd box is set to, and squid is still
> only using
> 4780 file descriptors.
Squid picks up the file descriptors at build time. Whatever they are at
build time is what you get from the binary forevermore. I'm not sure
about FreeBSD, but in Linux one must alter it in the shell doing the
building as well as at the OS level:
# ulimit -HSn 8192
For example. I am not familiar enough with FreeBSD to make any concrete
suggestions. There are many FreeBSD users here, though, and I reckon
they'll speak up if they know how to improve upon things.
> As for the load, yes. I can get up to about 300-350 hits per sec; and then I
> hit the file descriptor
> error (amongst others). But I'm slowly trying to chew though them. (note
> this is a minimal hardware
> test - I've no doubt it will go faster, but I'm only using 512meg of memory
> (80 to squid) and
> 1 7,200rpm ide drive).
And "You've no doubt it will go faster" than 350 reqs/sec, eh? I've got
some doubts, Dave.
> So far I've been able to tune it enough to at least
> function, but I dont
> want to blindly edit a source file and do something wrong.
>
> I understand that you in particular Joe, sell a product based on this.
> (stumbled accross you)
> Do you see the same results in "stress tests"? Or am I doing something
> awfully wrong here?
Yep, I'm afraid I do see the same results when I try to run a single IDE
disk at 350 reqs/sec. I think it has something to do with the laws of
physics, or something. ;-)
> Should I edit it by hand at build time? Should I just forget it? ...
> Or is there a better idea.
I'll repeat that you don't really need more than 4000 file descriptors.
I usually give it 8192, but I've never needed more than 3k even on
hardware that would crush what you're working with (2.4GHz, 3 x 15k RPM
disks, 2GB of DDR RAM). Worth mentioning is the fact that the monster
I've just described is the first Squid machine I've ever seen sustain
350 reqs/sec. for more than half an hour.
I would expect to sustain 80-100 reqs/sec on a Polygraph workload from
the hardware you describe using ReiserFS on Linux. I would expect
something a little less from a FreeBSD box with Soft Updates mounted
noatime. Go for 75 reqs/sec, and tell us how it goes. I bet things
will work great.
Adjusting your expectations might be the goal here. No amount of
adjusting is going to make Squid go that fast on that hardware.
-- Joe Cooper <joe@swelltech.com> Web caching appliances and support. http://www.swelltech.comReceived on Tue Sep 10 2002 - 21:36:18 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:10:11 MST