Re: paging question [message #73260] |
Thu, 04 November 2010 06:18 |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
On Thu, 4 Nov 2010, a wrote:
> I have a routine that reads in a file, does some processing and moves
> on to reading in the next file, for, say 1000 files.
>
> the first time I run it it takes some time, then subsequently it takes
> less time because the files are paged.
>
> is there a way of unpaging the files so I can show what it looks like
> realistically for timing reasons?
>
> Thanks
>
> Russ
>
>
You can clear the page and dir/inode caches in Linux by:
echo 3 > /proc/sys/vm/drop_caches
regards,
lajos
|
|
|
Re: paging question [message #73261 is a reply to message #73260] |
Thu, 04 November 2010 06:08  |
oxfordenergyservices
Messages: 56 Registered: January 2009
|
Member |
|
|
On Nov 4, 12:24 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Nov 4, 10:19 am, a <oxfordenergyservi...@googlemail.com> wrote:
>
>> I have a routine that reads in a file, does some processing and moves
>> on to reading in the next file, for, say 1000 files.
>
>> the first time I run it it takes some time, then subsequently it takes
>> less time because the files are paged.
>
>> is there a way of unpaging the files so I can show what it looks like
>> realistically for timing reasons?
>
>> Thanks
>
>> Russ
>
> I think it is done by the OS, and out of direct application control.
> But one way to force it might be to make an array that nearly fills
> the memory - followed by discarding the array, of course.
thanks Paulo. I'll do that in future.
Regards
Russ
|
|
|
Re: paging question [message #73263 is a reply to message #73261] |
Thu, 04 November 2010 05:24  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Nov 4, 10:19 am, a <oxfordenergyservi...@googlemail.com> wrote:
> I have a routine that reads in a file, does some processing and moves
> on to reading in the next file, for, say 1000 files.
>
> the first time I run it it takes some time, then subsequently it takes
> less time because the files are paged.
>
> is there a way of unpaging the files so I can show what it looks like
> realistically for timing reasons?
>
> Thanks
>
> Russ
I think it is done by the OS, and out of direct application control.
But one way to force it might be to make an array that nearly fills
the memory - followed by discarding the array, of course.
|
|
|