LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   i/o & cache (https://www.linuxquestions.org/questions/linux-general-1/i-o-and-cache-68505/)

lathaprabhu 06-27-2003 01:46 PM

i/o & cache
 
Hi

When I write to a file same amount of memory/cache is used. If there is no free memory then in some machine it reuses the cache, but some system doesn't!

That is on Red Hat Linux release 7.2, Kernel 2.4.7-10 total available memory is 2GB (32 bit OS) . In that if 1.5GB is used by a process and in same process if I try to write a file of 1GB there is no problem. Cache will keep on increasing till free memory available is 4MB and then it reuses the cache. (I check that using free -m -s 5)

But on SCO Linux, Kernel 2.4.19-SMP (3) total available memory is 65GB(64 bit OS). In that if 50GB is used by a process and in the same process if I try to write a file of 20GB there is a problem. Cache will keep on increasing till free memory available is 261MB and then system doesn't respond.

I am opening file with O_SYNC flag. Any idea why cache is not released/reused? Also, when I kill the process cache size remains same, and when I restart the process cache will be reused. Is there way to release the cache?

Since disk I/O uses kernel buffer I want to use raw i/o. I would appreciate your help on usage of raw i/o.

Thanks,
Latha


All times are GMT -5. The time now is 11:39 PM.