Re: disk file reads slow down for file sizes greater than 2 GB
From: Roy Lewallen (w7el_at_eznec.com)
Date: 03/26/04
- Next message: Robert Corbett: "Re: Is it possible to specify runtime edit descriptors in format statements ?"
- Previous message: Robert Corbett: "Re: write statement output buffer flush off on Sun"
- In reply to: James Giles: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Next in thread: Dr Ivan D. Reid: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Reply: Dr Ivan D. Reid: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Reply: David Frank: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Reply: Rich Townsend: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Reply: Roy Lewallen: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 25 Mar 2004 23:21:10 -0800
I might be able to offer some insight into your problem -- I think it's
the same one I've been chasing for several days now on a Windows XP
system. I'm also trying to write a fairly large file, several hundred
MB. I'm doing it in a program that's already using up a good fraction of
the machine's (1 GB) RAM, but I think the end result is the same as
you're seeing. Here's what happens --
When The WRITE statement occurs, the available RAM is reduced by the
amount of data written. Why Windows does this is a mystery to me, except
it's apparently buffering the written data and not returning the memory
after the write is complete. (Yes, I've tried FLUSH.) The program I
started with was writing it in chunks of about 32 kB. Every time another
chunk was written, the available RAM decreased by 32 dB, and it wasn't
given back. I'm monitoring the RAM use by calling Windows API function
GlobalMemoryStatus at various points and writing the result to a text file.
After all the available RAM is consumed by the write operations, memory
required by the program is furnished by Windows by means of paging it
from the virtual memory on the disk. This is a terribly slow and
inefficient process when a large amount of memory is being actively
used, and it's very likely the cause of your slowdown. There are
undoubtedly a number of ways to detect that this is happening, but I've
found a utility called FileMon to be handy -- it spots the writes to the
page file as they happen.
I'd really, REALLY like to figure out how to keep Windows from sucking
up the RAM every time I write a big file, or at least a way to get it
back. As it is, my program is hopelessly crippled after the first big
write operation, since from then on it's stuck with Windows virtual RAM
paging operation. Ironically, the file writing is part of a virtual
memory management scheme built into the program to avoid Windows getting
so low on RAM it goes into paging. But the writing itself is gobbling
the RAM. I've tried calling FLUSH after each write operation, different
sizes of chunks to write, and so forth, but no joy. I'm using CVF v.
6.6, and the file type is unformatted direct. I'd work out a way to deal
with binary or some other file type if I thought it would solve the
problem. Does anyone have any idea how to get around this? A different
compiler? Any ideas?
Thanks,
Roy Lewallen
- Next message: Robert Corbett: "Re: Is it possible to specify runtime edit descriptors in format statements ?"
- Previous message: Robert Corbett: "Re: write statement output buffer flush off on Sun"
- In reply to: James Giles: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Next in thread: Dr Ivan D. Reid: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Reply: Dr Ivan D. Reid: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Reply: David Frank: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Reply: Rich Townsend: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Reply: Roy Lewallen: "Re: disk file reads slow down for file sizes greater than 2 GB"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|