[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to get a silent harddisk?



Joachim Förster wrote:

Hi!

On Fri, 12 Sep 2003 14:47:04 -0600 (MDT) "Jacob Anawalt" <jacob@cachevalley.com> wrote:
Tom Allison said:
Jacob Anawalt wrote:
Joachim Förster said:

Does anybody know, why squid uses the harddisk although its (empty disk
cache, logs and other status files are on the tmpfs)?

I don't know why it uses the hard disk, but if it is only reading those
files and there is enough memory that they are cached in the kernel file
cache, then perhaps the atime is being updated and that is causing the
disk to spin up?

Are you mounting with the noatime option?

Maybe there's another http proxy that doesn't require any disk access?

I am interested in following this thread. I would like to set up a
similar
computer, with as few fans and spinning drives (zero would be ideal) as
possible while staying inexpensive and low-power.


For me, squid disk access while someone on my internal network is using
the proxy is not an issue. If squid were spinning up the drive when
'nothing'* is happening, calling sync()/fsync() for some odd reason then
that would be annoying. I'm running a gateway w/ squid right now, but I
haven't tried to stop the disk from spinning when squid is running.

Well, in the end I in fact want to have a PC without spinning up the disk at all, even when somebody is using it. When somebody is using sshd it whould be OK, but the use of dhcpd, squid*, isdnutils, dnsmasq should not bring up the disk.

*squid only with RAM cache, no disk cache!

Cool. I look forward to the details on what you had to tweak to get this :) Maybe send some tips to that silent-linux site I referenced.


I am unclear from Joachim's email if Squid is spinning up the disk all the
time for him, every x seconds, or only when the proxy is being used. If
it's only the latter then for my needs that's OK.

Sorry, for me squid is spinning up the disk all the time, even when not in use.

It still seems odd if writes are spinning up the drive with the read only
setting. Maybe some file squid wants to read keeps being dropped from file
cache between accesses because other programs or more frequently accessed
files are using all the memory? (Ie, because squid is set to use XMb in
memory, is there still enough free memory to cache all the files squid
wants to read. Add to that all other running program's requirements.)

I don't know. I moved the whole /var and /tmp things of squid to a tmpfs, so the files are in memory?

How much memory does this computer have? Hopefully lots.

You've got /var and /tmp in tempfs, squid's suppose to be doing all it's cache in memory, and any other program you're running that's not under inetd/xinetd but is running as a daemon is in memory. Is there enough to cache all of the files needed from /etc and binary/data files in /usr for all these programs?

Squid has lots of files in /usr/lib/squid like /usr/lib/squid/errors/* and /usr/lib/squid/icons/*. They shouldn't be being looked at every minute to keep noflushd from being able to spin the disk down, and even if they were, if there is enough free memory the kernel can cache those reads.

Unless someone else answers soon with some pertinant "how to run a diskless squid cache" answers and you have oodles of memory even with all the tempfs data and whatever you have the squid cache memory set to, I suggest posting to the squid-users list found at

http://www.squid-cache.org/mailing-lists.html#squid-users

I am interested in knowing what you learn, even though 100% diskless isn't my goal, I don't want squid to keep the disk spinning when no-one is accessing the proxy.

I did a little googling with site:squid-cache.org:

http://www.squid-cache.org/mail-archive/squid-users/200106/0399.html

That article is pretty old, so I don't know if things have changed. It suggests that the only way to stop Squid from scanning the disk cache is to stop squid. It seems very odd that if your squid cache is in /var, and /var is on a tempfs, that even the 'look for and clean stale objects' scan that message talks about would spin up your disk.

You asked for confirmation that the proxy has to know it's operating transparently or be designed to work that way. As far as I know you are correct. The fact that documents on iptables and squid say you need to tell squid it's working in this manner seems to reconfirm that.

the site. Joachim, you could try LRP, but load everything into memory from
your hd instead of from a floppy.

Hmmm, have to try it out ...

Since your goal is to have almost 100% no disk access, perhaps the LEAF project mds mentioned would be the best bet. I haven't looked at it, so I don't know how it meets your needs.

Jacob



Reply to: