File memory mapping and system cache behavior in WinXP

Our application uses memory intensively and deals with reading a large number of files on disk. The total load may be more than 3 GB.

There is a special memory manager that uses memory mapped files to achieve such huge data. Files are mapped to the process memory space only when necessary, and with this the process memory is controlled. But it is observed that when matching memory, the system cache continues to increase until it takes up available physical memory. This slows down the entire system.

My question is how to prevent system caching due to physical memory? I tried to remove file buffering (using FILE_FLAG_NO_BUFFERING), but read operations take a considerable amount of time and slow down application performance. How to achieve scalability without sacrificing great success. What are the common methods used in such cases?

I do not have a good understanding of the caching behavior of WinXP OS. Any good links explaining the same will also be helpful.

+3
source share
2 answers

, , - .

Windows , .

, , .

XP , , , . XP, . , !

, , (Exchange, SQL). , , .

- , :

FILE_FLAG_NO_BUFFERING FILE_FLAG_WRITE_THROUGH

, CM, ( , ), Caching Behavior

, , ,

, , Windows 2003 . , , Windows 7/Server 2008, - / . ,

+3

.vbs . , , . . - , . , , . , 1 RAM, vbs.

FreeMem=Space(240000000) <This one is to clear 512 MB ram> 
FreeMem=Space(120000000)  <This one is to clear 256 MB ram>   
FreeMem=Space(90000000)   <This one is to clear 128 MB ram> 
FreeMem=Space(48000000)  <This one is to clear 64 MB ram> 
FreeMem=Space(20000000)   <This one is to clear 52 MB ram> 
+1

Source: https://habr.com/ru/post/1743965/


All Articles