1. [OT] Linux caches
- Posted by Patrick.Barnes at transgrid.com.au Jan 13, 2003
- 453 views
My precious linux server box stopped working!... namely the telnet server, the samba server, and the squid server. There may have been more, but not something that I used... When I found that my hard drive capacity was 4.3G and my used space was 4.3G (by cat'ing something in the /proc folder) I got a little suspicious. This machine is a fileserver and an internet gateway, and it has a 1G internet cache set. Methinks the cache should be smaller for such a small hard drive. How do I change the internet cache size (in squid I think) down to something a little more maneageable, and what is the location of the cache folder, so I can clear it out? Sorry to bother you Euphorians. ============================================== _______<-------------------\__ / _____<--------------------__|=== | |_ <-------------------/ \__| Patrick Barnes *********************************************************************** ***********************************************************************
2. Re: [OT] Linux caches
- Posted by jbrown1050 at hotpop.com Jan 14, 2003
- 464 views
On Tue, Jan 14, 2003 at 09:44:53AM +1100, Patrick.Barnes at transgrid.com.au wrote: > > My precious linux server box stopped working!... namely the telnet server, the > samba server, and the squid server. There may have been more, but not something > that I used... > > When I found that my hard drive capacity was 4.3G and my used space was 4.3G > (by cat'ing something in the /proc folder) I got a little suspicious. This > machine is a fileserver and an internet gateway, and it has a 1G internet cache > set. Methinks the cache should be smaller for such a small hard drive. > > How do I change the internet cache size (in squid I think) down to something a > little more maneageable, and what is the location of the cache folder, so I can > clear it out? > > Sorry to bother you Euphorians. > Hmm ... /etc/squid/squid.conf Thats where you can change your settings. (At least its where mine are.) The option to control that would be cache_dir. cache_dir ufs /var/cache/squid 100 16 256 Taking that example line, ufs - Its the type of cache access used. ufs is the orignal Squid one, aufs is a version which uses POSIX threads to avoid blocking the main squid process, and diskd is another variant on that which uses a separate process altogether to do the cache access. /var/cache/squid - The directory to use as the cache. This is the place which holds the stuff you may want to delete. 100 - in megabytes (MB), the amount of space to use for the cache. You'll prob want to change this in your own squid file as well. 16 - number of top-level subdirs to have in the cache dir. 256 - number of second-level subdirs to have in the cache dir. If you use diskd, 2 more options apply: cache_dir diskd /var/cache/squid 100 16 256 64 72 64 - number of unacknowledged I/O requests when Squid stops opening new files. 72 - number of unacknowledged messages when Squid starts blocking. Does the Above help at all Pat? jbrown > > ============================================== > _______<-------------------\__ > / _____<--------------------__|=== > | |_ <-------------------/ > \__| Patrick Barnes > > Nice, but long, Sig. Also, why doesnt everyone repesct the 80-col width standard? *sigh* > > *********************************************************************** > > > *********************************************************************** > > > > TOPICA - Start your own email discussion group. FREE! -- /"\ ASCII ribbon \ / campain against X HTML e-mail and /*\ news and unneeded MIME
3. Re: [OT] Linux caches
- Posted by jbrown1050 at hotpop.com Jan 14, 2003
- 485 views
On Tue, Jan 14, 2003 at 01:03:19PM +1100, Patrick.Barnes at transgrid.com.au wrote: > > That helps a lot, thank you. > No problem. > >cache_dir ufs /var/cache/squid 100 16 256 > > I'm not sure what the significance of having subdirectories and subdirectories > > under that accomplishes... What is the purpose of having them? > Not really sure. Perhaps for organization or soemthing? > Also, which file in /proc would be the best one to look at for filesize > information, or what command will give the total size of a directory and > all it's contents? > Not sure where in /proc (which is Linux specific afaik, tho I'm probably wrong). "du -hs <dir>" gives the total size of a directory. "df -h" gives the total free space of all mounted filesystems, can give it a parameter to get it to show the free space for selected filesystems (like "df -h /tmp" to get free space for the filesystem where /tmp is located on). HTH. > >Nice, but long, Sig. Also, why doesnt everyone repesct the 80-col width > >standard? > >*sigh* > > My email wordwraps, so I don't notice. Ah ok, thanks for fix it. > > ====================== > ____<---------\__ > / ___<----------__|=== > || <---------/ > \_| Patrick Barnes > > (shorter sig) Yay! LOL. > <snip of old email text> jbrown > > > > TOPICA - Start your own email discussion group. FREE! -- /"\ ASCII ribbon \ / campain against X HTML e-mail and /*\ news and unneeded MIME