Re: how to get a silent harddisk?
On Sat, 13 Sep 2003 23:49:16 -0600 Jacob Anawalt <jacob@cachevalley.com> wrote:
> 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.
Hmmm, only 64MB. I think it could be too less.
> 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?
I think that this is the problem ...
> 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.
The files in /usr/lib/share are not that huge. Moving them to tmpfs should be no problem. I tried this yesterday (with a chroot jail), but till now I haven't been successful, because there is something wrong with my chroot jail (see my other mail/answer to Stephan's mail I think).
> 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.
Ok.
> 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.
Last evening I was on leaf.sourceforge.net and studied the feature lists. The thing which is missing from all (or I didn't see it), is the ISDN support. Perhaps I have to look on other sites, too ...
Anyway I think LEAF shall be my last try. In fact I don't want to give up Debian (on my gateway machine :).
Joachim
Reply to: