Re: [squid-users] File Descriptors causing an issue in OpenBSD
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 10 Aug 2007 01:17:21 +0530 Preetish [EMAIL PROTECTED] wrote: Odd.. are you sure you are really running the new binary, and that the ulimit setting is done correctly in the start script? #Squid startup/shutdown if [ -z $1 ] ; then echo -n Syntax is: $0 start stop exit fi if [ $1 != start -a $1 != stop ]; then echo -n Wrong command exit fi if [ -x /usr/local/sbin/squid ]; then if [ $1 = 'start' ] ; then echo -n 'Running Squid: ';ulimit -HSn 8192; /usr/local/sbin/squid else echo -n 'Killing Squid: '; /usr/local/sbin/squid -k shutdown fi else echo -n 'Squid not found' fi d What do you get when you issue the following 2 commands: limits No command limit. and ulimit -n 1024 Hi Preetish, That shows that you have only 1024 file descriptors available on your system. In my FreeBSD machines, I usually don't have to adjust file descriptors because the defaults are more than I need (7000 - 14000). kern.maxfiles kern.maxfilesperproc i did sysctl -w kern.maxfiles=8192 sysctl -w kern.maxfilesperproc=8192 --- this gives a error I guess you don't have the kern.maxfilesperproc variable. What do you have for your kern.maxusers variable? If nothing helps, you may have to re-compile your kernel with the following added parameter: option MAXFILES=8192 But still, I think that there are other ways to increase your file descriptors besides re-compiling your kernel. You can ask for help in the openbsd mailing list regarding your problem. Then i even made changes the Options in /etc/login.def {{ default:\ :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin:\ :umask=022:\ :datasize-max=512M:\ :datasize-cur=512M:\ :maxproc-max=512:\ :maxproc-cur=64:\ :openfiles-cur=8192:\ :stacksize-cur=4M:\ :localcipher=blowfish,6:\ :ypcipher=old:\ :tc=auth-defaults:\ :tc=auth-ftp-defaults: }} and {{ daemon:\ :ignorenologin:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=8192:\ :stacksize-cur=8M:\ :localcipher=blowfish,8:\ :tc=default: }} and after doing all these changes i uninstalled squid completely and all its file and everything .Then recompiled it and installed it againBut DAMM it gave me the same number of file descriptors. So now i have reduced the cache to 10 GB. I found a Squid Definitive guide where he said to recompile the kernel after editing the kernel configuration file . Reducing just the size of your cache may not be able to help you much with your file descriptors limit. Squid Object Cache: Version 2.6.STABLE13 Start Time: Thu, 09 Aug 2007 19:09:36 GMT Current Time: Thu, 09 Aug 2007 19:11:13 GMT Connection information for squid: Number of clients accessing cache: 321 Number of HTTP requests received: 2649 Number of ICP messages received:0 Number of ICP messages sent:0 Number of queued ICP replies: 0 Request failure ratio: 0.00 Average HTTP requests per minute since start: 1638.4 Average ICP messages per minute since start:0.0 Select loop called: 34876 times, 2.782 ms avg Cache information for squid: Request Hit Ratios: 5min: 15.1%, 60min: 15.1% Byte Hit Ratios:5min: 29.4%, 60min: 29.4% Request Memory Hit Ratios: 5min: 9.7%, 60min: 9.7% Request Disk Hit Ratios:5min: 44.4%, 60min: 44.4% Storage Swap size: 23806 KB Storage Mem size: 2516 KB Mean Object Size: 7.57 KB Requests given to unlinkd: 0 Median Service Times (seconds) 5 min60 min: HTTP Requests (All): 0.68577 0.68577 Cache Misses: 1.24267 1.24267 Cache Hits:0.00179 0.00179 Near Hits: 0.68577 0.68577 Not-Modified Replies: 0.00091 0.00091 DNS Lookups: 0.00190 0.00190 ICP Queries: 0.0 0.0 - From your above data, your service response times which are under 1.5 seconds are good figures for a satellite link. Before, it was 15 seconds! Considering that, your proxy server is much faster now. But since your data above is only 2 minutes old, you have to monitor in regularly for a longer period of time. Starting with a cache_dir size of 10GB is good start. You can later increase it's size based upon your needs and demands. Thanking you... :((( Preetish - -- With best regards and good wishes, Yours sincerely, Tek Bahadur Limbu (TAG/TDG Group) Jwl Systems Department Worldlink Communications Pvt. Ltd.
Re: [squid-users] File Descriptors causing an issue in OpenBSD
Hi All, Recompilng the kernel with MAXFILES=8192 worked. I even had to add the line :openfiles-max=infinity:\ to /etc/login.def in the daemon section. Well now the File Descriptors has increased and even the internet speed is good ( i ll know it better by tomorrow). I have kept my cache to 10 Gb right now.Thanks to everyone :) Cheers Preetish
[squid-users] File Descriptors causing an issue in OpenBSD
Hi Everybody I have recompiled Squid the way i saw in one of the how to. this is what i did 1)I uninstalled Squid 2) #ulimit -HSn 8192 #then recompiled squid with --with-maxfd=8192 then in my starting squid script i have added ulimit -HSn 8192 But still it shows the same number of file descriptors File descriptor usage for squid: Maximum number of file descriptors: 1024 Largest file desc currently in use:939 Number of file desc currently in use: 929 Files queued for open: 1 Available number of file descriptors: 94 Reserved number of file descriptors: 100 Store Disk files open: 19 IO loop method: kqueue There is something fishy about it coz my cache is only 1.1G . and moreover there is a file squid.core in my /etc/squid and i do not understand its porpose. i searched for it online but still i did understand it. Is my squidclient giving me stale results. I had even cleaned the cache before reinstalling squid. Is there some different way to increase the file descriptors in OpenBSD. Kindly Help. Regards Preetish
Re: [squid-users] File Descriptors causing an issue in OpenBSD
On tor, 2007-08-09 at 17:00 +0530, Preetish wrote: Hi Everybody I have recompiled Squid the way i saw in one of the how to. this is what i did 1)I uninstalled Squid 2) #ulimit -HSn 8192 #then recompiled squid with --with-maxfd=8192 then in my starting squid script i have added ulimit -HSn 8192 Sounds right. Acutally the ulimit when compiling isn't needed when you use the configure option. But still it shows the same number of file descriptors File descriptor usage for squid: Maximum number of file descriptors: 1024 Odd.. are you sure you are really running the new binary, and that the ulimit setting is done correctly in the start script? To verify the binary run /path/to/sbin/squid -v There is something fishy about it coz my cache is only 1.1G . and moreover there is a file squid.core in my /etc/squid and i do not understand its porpose. The squid.core is a coredump from a fatal error. You can remove it. i searched for it online but still i did understand it. Is my squidclient giving me stale results. I had even cleaned the cache before reinstalling squid. Is there some different way to increase the file descriptors in OpenBSD. Kindly Help. What you did should work from what I can tell. Regards Henrik signature.asc Description: This is a digitally signed message part
Re: [squid-users] File Descriptors causing an issue in OpenBSD
Preetish wrote: Hi Everybody I have recompiled Squid the way i saw in one of the how to. this is what i did 1)I uninstalled Squid 2) #ulimit -HSn 8192 #then recompiled squid with --with-maxfd=8192 then in my starting squid script i have added ulimit -HSn 8192 But still it shows the same number of file descriptors File descriptor usage for squid: Maximum number of file descriptors: 1024 Largest file desc currently in use:939 Number of file desc currently in use: 929 Files queued for open: 1 Available number of file descriptors: 94 Reserved number of file descriptors: 100 Store Disk files open: 19 IO loop method: kqueue There is something fishy about it coz my cache is only 1.1G . and moreover there is a file squid.core in my /etc/squid and i do not understand its porpose. i searched for it online but still i did understand it. Is my squidclient giving me stale results. I had even cleaned the cache before reinstalling squid. Is there some different way to increase the file descriptors in OpenBSD. Kindly Help. Hi Preetish, On a Linux box, that should have worked right away. I assume that they should also work for BSD boxes too. By the way, as Henrik mentioned, did you verify the binary run /path/to/sbin/squid -v What do you get when you issue the following 2 commands: limits and ulimit -n On your OpenBSD machine, I was wondering why your file descriptors is only 1024 in the first place. On BSD systems, I think increasing the following sysctl tunables might help in general for a busy machine: kern.maxfiles kern.maxfilesperproc Set those values to say 8192 or higher and save it in either your /boot/loader.conf or /etc/sysctl.conf in case of a reboot. Hope it helps. Thanking you... Regards Preetish -- With best regards and good wishes, Yours sincerely, Tek Bahadur Limbu (TAG/TDG Group) Jwl Systems Department Worldlink Communications Pvt. Ltd. Jawalakhel, Nepal http://www.wlink.com.np
Re: [squid-users] File Descriptors causing an issue in OpenBSD
Odd.. are you sure you are really running the new binary, and that the ulimit setting is done correctly in the start script? #Squid startup/shutdown if [ -z $1 ] ; then echo -n Syntax is: $0 start stop exit fi if [ $1 != start -a $1 != stop ]; then echo -n Wrong command exit fi if [ -x /usr/local/sbin/squid ]; then if [ $1 = 'start' ] ; then echo -n 'Running Squid: ';ulimit -HSn 8192; /usr/local/sbin/squid else echo -n 'Killing Squid: '; /usr/local/sbin/squid -k shutdown fi else echo -n 'Squid not found' fi d What do you get when you issue the following 2 commands: limits No command limit. and ulimit -n 1024 kern.maxfiles kern.maxfilesperproc i did sysctl -w kern.maxfiles=8192 sysctl -w kern.maxfilesperproc=8192 --- this gives a error Then i even made changes the Options in /etc/login.def {{ default:\ :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin:\ :umask=022:\ :datasize-max=512M:\ :datasize-cur=512M:\ :maxproc-max=512:\ :maxproc-cur=64:\ :openfiles-cur=8192:\ :stacksize-cur=4M:\ :localcipher=blowfish,6:\ :ypcipher=old:\ :tc=auth-defaults:\ :tc=auth-ftp-defaults: }} and {{ daemon:\ :ignorenologin:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=8192:\ :stacksize-cur=8M:\ :localcipher=blowfish,8:\ :tc=default: }} and after doing all these changes i uninstalled squid completely and all its file and everything .Then recompiled it and installed it againBut DAMM it gave me the same number of file descriptors. So now i have reduced the cache to 10 GB. I found a Squid Definitive guide where he said to recompile the kernel after editing the kernel configuration file . Squid Object Cache: Version 2.6.STABLE13 Start Time: Thu, 09 Aug 2007 19:09:36 GMT Current Time: Thu, 09 Aug 2007 19:11:13 GMT Connection information for squid: Number of clients accessing cache: 321 Number of HTTP requests received: 2649 Number of ICP messages received:0 Number of ICP messages sent:0 Number of queued ICP replies: 0 Request failure ratio: 0.00 Average HTTP requests per minute since start: 1638.4 Average ICP messages per minute since start:0.0 Select loop called: 34876 times, 2.782 ms avg Cache information for squid: Request Hit Ratios: 5min: 15.1%, 60min: 15.1% Byte Hit Ratios:5min: 29.4%, 60min: 29.4% Request Memory Hit Ratios: 5min: 9.7%, 60min: 9.7% Request Disk Hit Ratios:5min: 44.4%, 60min: 44.4% Storage Swap size: 23806 KB Storage Mem size: 2516 KB Mean Object Size: 7.57 KB Requests given to unlinkd: 0 Median Service Times (seconds) 5 min60 min: HTTP Requests (All): 0.68577 0.68577 Cache Misses: 1.24267 1.24267 Cache Hits:0.00179 0.00179 Near Hits: 0.68577 0.68577 Not-Modified Replies: 0.00091 0.00091 DNS Lookups: 0.00190 0.00190 ICP Queries: 0.0 0.0 :((( Preetish