Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Windows won't cache disk file access

22 views
Skip to first unread message

Dan D

unread,
Jul 29, 2009, 6:16:25 AM7/29/09
to
I'm running Windows XP Pro SP2 on a laptop with 3G of RAM.

If I just boot up Windows and start Excel, it grinds the hard drive
for 3-4 seconds, then loads. If I quit it and start it again, it loads
up almost instantly. All the files it needs to read off disk are
cached.

Now if I start Firefox with 10-15 tabs and do the same Excel test, it
grinds the hard drive for 3 seconds every time. I wouldn't mind this
about Excel, but when I'm developing and compiling programs with large
dependency chains, it's painful to wait every time for half a minute
until everything is read off the disk, instead of just a few seconds
if reads were cached.

Does anyone have an idea what's causing this?

I already applied the hack #4 (Kernel Paging and Cache Tuning) from
http://kadaitcha.cx/performance.html to increase the cache size, but
that didn't help.

Thanks,
Dan
--
http://wiki.dandascalescu.com/howtos/windows

Elmo

unread,
Jul 29, 2009, 8:04:08 AM7/29/09
to

What is the RAM configuration? How many slots? Try lowering to two
sticks of the same size, say, two 1GB sticks.. just as a test..

--
Joe =o)

Unknown

unread,
Jul 29, 2009, 8:36:50 AM7/29/09
to
One thing that may put things back to the way they were is to delete the
Windows Prefetch files.
They are located: C:\WINDOWS\Prefetch directory.

After they are deleted it will take about 4 or 5 reboots for the PC to be
fully up to speed, you may notice that the first few reboots will be slower
than usual. After each reboot run and exit the applications you normally use
and then reboot again and repeat the process of running common applications.

Information on the Prefetch files and how they are used.
http://www.windowsnetworking.com/articles_tutorials/Gaining-Speed-Empty-Prefetch-XP.html

When you check the value in the registry in the above article,
the best setting is to "Prefetch Everything".

--
JS
http://www.pagestart.com

"Dan D" <ddasc...@gmail.com> wrote in message
news:9dda5c09-b163-432f...@d9g2000prh.googlegroups.com...

Singapore Computer Service

unread,
Jul 29, 2009, 9:14:39 AM7/29/09
to

Hello,

First. defrag your hard disk. Start > Programs > Accessories > System Tools
> Disk Defragmenter

Otherwise, you can try disabling the page file and see if it helps ( Step 2
in http://support.microsoft.com/kb/308417 ). Some people are strongly
against it, but you can try and see if it makes a difference. Note that when
you do this tweak and run out of memory, the programs that you are running
will be affected. So if your memory requirements at any one time exceed the
RAM you have, then you should not apply this tweak

Regards,
Singapore Computer Home Repair Service
http://www.bootstrike.com/ComputerService/
Video Conversion VHS Video8 Hi8 Digital8 MiniDv MicroMv
http://www.bootstrike.com/VHSVideoConvert/


"Dan D" <ddasc...@gmail.com> wrote in message
news:9dda5c09-b163-432f...@d9g2000prh.googlegroups.com...

HeyBub

unread,
Jul 29, 2009, 10:11:50 AM7/29/09
to

Uh, that's what a RAM cache does.

In your first test, repeated reloading of Excel, most of the what you want
is already in RAM so there's no need to access the disk.

In the second case, most of RAM is taken up by another program. When you
start Excel, the other program is rolled out to make room, a fresh copy of
Excel is loaded. Upon exiting Excel, the original program is rolled back in.
A subsequent invocation of Excel generates the same sequence (roll out
active program, start Excel).

You might be able to mitigate the wait time by increasing RAM to the max
(about 4GB).


Dan Dascalescu

unread,
Jul 29, 2009, 4:19:15 PM7/29/09
to
> What is the RAM configuration? How many slots?

2 slots, 1 2GB, 1 1GB.

> Try lowering to two sticks of the same size, say,
> two 1GB sticks.. just as a test..

That's... interesting. Why would XP cache more files in RAM when
there's less RAM available? I'm not saying it wouldn't be the case,
just that it would be odd.

> You might be able to mitigate the wait time by increasing RAM to the max
> (about 4GB).

I asked for 4G of RAM and the IT guy here said that XP would only
handle 3G. Not sure if that's true, but anyway, see below.

> In the second case, most of RAM is taken up by another program. When you
> start Excel, the other program is rolled out to make room, a fresh copy of
> Excel is loaded. Upon exiting Excel, the original program is rolled back in.
> A subsequent invocation of Excel generates the same sequence (roll out
> active program, start Excel).

We're talking about one Firefox instance with 11 tabs and 3 gigs of
RAM. There is no conceivable way a sane operating system would need to
swap Firefox out to disk.

With Firefox having *100* tabs open, and Outlook loaded and a bunch of
other smaller apps, there's still a ton of RAM available. Process
Explorer shows in that case:

Physical Memory (K):
Total 3,136,876
Available 1,855,544
System Cache 429,244

So why doesn't XP use 2 gigabytes of RAM and instead grinds the hard
drive every time I run the same app again?

Unknown

unread,
Jul 29, 2009, 5:38:27 PM7/29/09
to
The IT guy is correct, almost all of that 4th GB of ram
is not going to be used and goes to waist. 3GB is more
than enough.

Test your hard drive transfer speed and S.M,A.R.T values.
Typical drive transfer rates should be 60MB/sec at the beginning
of the drive an about 35 MS/s near the end.

Try HD Tune, provides drive info and has an option to test your drive.
http://www.hdtune.com/

Also SpeedFan has an online health analysis feature
(SMART tab) for hard drives. It will show how your drives
compares with other drives of the same make and model.
http://www.almico.com/speedfan.php

--
JS
http://www.pagestart.com

"Dan Dascalescu" <ddasc...@gmail.com> wrote in message
news:e58b7ad8-e338-4556...@v15g2000prn.googlegroups.com...

Ken Blake, MVP

unread,
Jul 29, 2009, 6:01:59 PM7/29/09
to
On Wed, 29 Jul 2009 13:19:15 -0700 (PDT), Dan Dascalescu
<ddasc...@gmail.com> wrote:


> I asked for 4G of RAM and the IT guy here said that XP would only
> handle 3G. Not sure if that's true, but anyway, see below.


Two points:

1. The "IT guy" is not exactly right, but close. Here's the full
story.

All 32-bit client versions of Windows (not just Vista/XP) have a 4GB
address space (64-bit versions can use much more). That's the
theoretical upper limit beyond which you can not go.

But you can't use the entire 4GB of address space. Even though you
have a 4GB address space, you can only use *around* 3.1GB of RAM.
That's because some of that space is used by hardware and is not
available to the operating system and applications. The amount you can
use varies, depending on what hardware you have installed, but can
range from as little as 2GB to as much as 3.5GB. It's usually around
3.1GB.

Note that the hardware is using the address *space*, not the actual
RAM itself. If you have a greater amount of RAM, the rest of the RAM
goes unused because there is no address space to map it to.

2. Even 3GB is probably more than you can make effective use of. How
much RAM you need for good performance is *not* a one-size-fits-all
situation. You get good performance if the amount of RAM you have
keeps you from using the page file significantly, and that depends on
what apps you run. Most people running a typical range of business
applications find that somewhere around 512MB works well, others need
more. Almost anyone will see poor performance with less than 256MB.
Some people, particularly those doing things like editing large
photographic images, can see a performance boost by adding even more
than 512MB--sometimes much more.

If you are currently using the page file significantly, more memory
will decrease or eliminate that usage, and improve your performance.
If you are not using the page file significantly, more memory will do
nothing for you. Go to
http://billsway.com/notes%5Fpublic/winxp%5Ftweaks/ and download
WinXP-2K_Pagefile.zip and monitor your page file usage. That should
give you a good idea of whether more memory can help, and if so, how
much more.


--
Ken Blake, Microsoft MVP - Windows Desktop Experience
Please Reply to the Newsgroup

Dan Dascalescu

unread,
Jul 30, 2009, 12:04:23 AM7/30/09
to
> Test your hard drive transfer speed and S.M,A.R.T values.
> Typical drive transfer rates should be 60MB/sec at the beginning
> of the drive an about 35 MS/s near the end.

I'm sorry, but how does that help? Windows shouldn't even hit the
disk.

The problem is that Windows doesn't cache the files read from the disk
by an application that's repeatedly started, even though there's 1.8GB
of RAM available.

> Try HD Tune, [...]
> Also SpeedFan [...]

They are both popular but inferior to http://hddscan.com/

Ken, I ran the script you suggested. Here are the results:

---------------------------
WinXP Pagefile Usage Monitor by Bill James
---------------------------
Pagefile Physical Location: C:\pagefile.sys
Current Pagefile Usage: 37 MB
Session Peak Usage: 82 MB
Current Pagefile Size: 3048 MB

Also, my Peak Commit Charge was 1527912K (1.5GB), with all the
applications I use.

Looks to me that we're talking about a caching, not a paging issue
here. Is there a way to let Windows keep more data in the disk cache?
I've already set Performance Options -> Advanced -> Memory usage to
System Cache, but that didn't help.

Ken Blake, MVP

unread,
Jul 30, 2009, 10:39:23 AM7/30/09
to
On Wed, 29 Jul 2009 21:04:23 -0700 (PDT), Dan Dascalescu
<ddasc...@gmail.com> wrote:

> > Test your hard drive transfer speed and S.M,A.R.T values.
> > Typical drive transfer rates should be 60MB/sec at the beginning
> > of the drive an about 35 MS/s near the end.
>
> I'm sorry, but how does that help? Windows shouldn't even hit the
> disk.
>
> The problem is that Windows doesn't cache the files read from the disk
> by an application that's repeatedly started, even though there's 1.8GB
> of RAM available.
>
> > Try HD Tune, [...]
> > Also SpeedFan [...]
>
> They are both popular but inferior to http://hddscan.com/
>
> Ken, I ran the script you suggested. Here are the results:
>
> ---------------------------
> WinXP Pagefile Usage Monitor by Bill James
> ---------------------------
> Pagefile Physical Location: C:\pagefile.sys
> Current Pagefile Usage: 37 MB
> Session Peak Usage: 82 MB


Those numbers suggest that you have at least as much RAM as you need,
and very possibly substantially more. Adding RAM wouldn't improve
performance and decreasing it probably wouldn't hurt.


> Current Pagefile Size: 3048 MB

>
> Also, my Peak Commit Charge was 1527912K (1.5GB), with all the
> applications I use.
>
> Looks to me that we're talking about a caching, not a paging issue
> here. Is there a way to let Windows keep more data in the disk cache?
> I've already set Performance Options -> Advanced -> Memory usage to
> System Cache, but that didn't help.

--

Ken Blake, MVP

unread,
Jul 30, 2009, 10:53:08 AM7/30/09
to


I should also mention that that's clearly much more than you typically
need. If disk space is an issue, you could save some by making the
minimum page file size much smaller--200MB or so. But leave the
maximum high, so it can expand should it ever need to.

Unknown

unread,
Jul 30, 2009, 2:01:16 PM7/30/09
to
Well clearly something is accessing the disk.
Either you are low on free disk space, pagefile
is too small or possibly your AV software does
a background scan on any application files or
data file you access.

--
JS
http://www.pagestart.com

"Dan Dascalescu" <ddasc...@gmail.com> wrote in message

news:a8c6868c-c2d9-4ab1...@d36g2000prb.googlegroups.com...

Dan Dascalescu

unread,
Jul 31, 2009, 5:33:07 PM7/31/09
to
On Jul 30, 11:01 am, "JS" <@> wrote:
> Well clearly something is accessing the disk.

Only if Firefox is loadd with 10+ tabs. Not if I just run Excel
repeatedly without Firefox being launched.

> Either you are low on free disk space,

2GB free disk space.

> pagefile is too small

Err. See Ken's reply.

> or possibly your AV software does
> a background scan on any application files or
> data file you access.

While my laptop does run the crap Symantec Antivirus (IT policy), that
doesn't explain why it *rereads from disk and* scans Excel's
dependencies only when Firefox is loaded.

Note that the antivirus should obey caching as well, and (if idiotic
enough to re-read unmodified DLL files), should re-read them from the
system cache.

Dan

Dan Dascalescu

unread,
Jul 31, 2009, 9:48:58 PM7/31/09
to
> > > Current Pagefile Size:        3048 MB
>
> I should also mention that that's clearly much more than you typically
> need. If disk space is an issue, you could save some by making the
> minimum page file size much smaller--200MB or so. But leave the
> maximum high, so it can expand should it ever need to.

I set the swap file to 500MB minimum, launched a ton of apps, and it
hasn't grown.

Still, when I start Excel repeatedly, Windows XP SP2 keeps grinding
the disk. This is simply retarded.

0 new messages