Re: Memory management/File IO related problem.
From: Darren Dunham (ddunham_at_redwood.taos.com)
Date: 09/09/03
- Previous message: Eric Gisin: "solaris timeline"
- In reply to: Nikos Massios: "Memory management/File IO related problem."
- Next in thread: Logan Shaw: "Re: Memory management/File IO related problem."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 09 Sep 2003 04:30:54 GMT
Nikos Massios <massios@inl.nl> wrote:
> We are using:
> Solaris 7, gcc 2.8.1
> Our application:
> A process runs consecutively with several different
> parameters. Each time, depending on the parameters, different
> (small) parts of a large binary file are accessed with
> fseek, fread. To give some idea on the sizes involved
> the file is around 900mb and the total data read each time
> is around 1mb. This 1mb is distributed at around 1000
> different places in the 900mb file. At each place roughly
> the same amount of data is read (around 1kb).
> Our problem:
> It seems to us that Solaris 7 is mapping parts of the file
> to memory automatically (we can also map the entire file
> with mmap if we want to). It is to be seen (1) while each
> process is running and (2) after each process has completed.
That seems incorrect. Can you do a 'pmap -x PID' for the process both
before and after the memory increase? Are there new segments mapped, or
are existing segments larger?
Simple 'fread' stuff shouldn't add anything to the process size. The
file will be cached, but it will be cached in space managed by the
kernel and the filesystem, not in the process space.
My first assumption is that something else is going on in your code, but
it's difficult to be certain.
> The Question:
> Is there a way to either:
> a) Disable completely the memory mapping of files used by
> our processes. Either in C or in Solaris.
It shouldn't happen at all in the way you describe.
--
Darren Dunham ddunham@taos.com
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
- Previous message: Eric Gisin: "solaris timeline"
- In reply to: Nikos Massios: "Memory management/File IO related problem."
- Next in thread: Logan Shaw: "Re: Memory management/File IO related problem."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|