[ale] Preloading disk cache
jeff_hubbs at mcgraw-hill.com
jeff_hubbs at mcgraw-hill.com
Fri Nov 27 10:53:04 EST 1998
Todd -
I just wanted to pass along some feedback to you about your repsonse to my
question about preloading Linux disk cache.
In advance of my actually getting ready to experiment with launching
Office97 apps on Win95 machines over the network from Linux/Samba, I
started a Win95 install using much the same mechanism. Using your
suggestion, I had created a list with the paths for EXTRACT.EXE,
PRECOPY1.CAB, PRECOPY2.CAB, and WIN95_02.CAB through WIN95_06.CAB (about
all I had enough RAM for) and executed your command on the Linux/Samba
server prior to starting the Win95 install. I started the install, and
during the file copying portion it went quite fast up until about 15%
complete and then slugged bigtime. This is different than the slugginess I
had observed previously, which was pervasive beginning to end.
Bear in mind that in this case the server is a local-bus 486DX2/66 with a
single IDE drive and 16MB RAM and the client is a 486DX/33 with only 8MB
RAM
Todd Graham Lewis <tlewis at mindspring.net> on 11/22/98 10:44:52 PM
To: Jeff Hubbs/Tower
cc: ale at cc.gatech.edu
Subject: Re: [ale] Preloading disk cache
On Fri, 20 Nov 1998 jeff_hubbs at mcgraw-hill.com wrote:
> Can anyone recommend a way to "pre-load" the disk cache such that if I
had
> Win95 users (sorry, guys - fact of life here for now) running a network
> install of Office 97 apps stored on Linux/Samba, the first launch would
> come out of cache (as opposed to having to gronk the hard drive for it)?
Linux caches all disk reads on a FIFO basis. The easiest way to do this
is to come up with a list of files you want "primed" and then do:
cat list | xargs cat > /dev/null
in your samba startup script. Be sure that these files are smaller than
the available free memory in your machine! If you have 64 MB of RAM, you
only want to do this to ~50 MB or so, assuming that everything else takes
up 10MB of RAM. If you do this, then Linux will read the files out of the
cache rather than off of disk.
> Also: It seems like the use of disk cache isn't universal. If I'm using
a
> Web browser to browse though Samba shares (as one might when, for
instance,
> cruising the HOWTOs), when I enter a directory with a lot fo files in it
> and it takes a long time for the browser to read all the names, it's no
> faster the second time I go in. On the other hand, if I am copying files
> around via Windows Explorer, subsequent reads out of directories are
> *obviously* coming out of cache. Can anyone explain this and/or
> characterize the workings of Linux disk cache for me?
Using a web browser locally or over the network? If both cases are over
the network, then the explanation is easy: windows explorer keeps a local
cache of dir listings, while your web browser does not. Ergo, your web
browser has to sustain a lot of network latency and TCP slowstart to
re-fetch the listing, while explorer just pulls it out of RAM. This has
nothing to do with your Linux box; if you put a web browser and export
a FS from an NT box, performance will be identical. It's a design turd.
--
Todd Graham Lewis MindSpring Enterprises tlewis at mindspring.net
The Windows 2000 name was obviously created over a glass of root beer
in the company cafeteria by a couple of executives looking for a way
out of the Windows NT delays. -- John C. Dvorak
More information about the Ale
mailing list