CM keeps too many files open

Hi,

with my FSD I experience the problem that the cache manager keeps too many
files referenced so that my FCBs occupy too much memory and the system is
finally running out of resources.

This happens on W2K SP3 if the user is accessing many small files. This
system has sufficient memory.

My Question: Is it my task to watch the memory usage and finally force CC
to release some files or am I doing something else wrong here?

Thanks,
Detlef

dg6£¬

with my FSD I experience the problem that the cache manager keeps too many
files referenced so that my FCBs occupy too much memory and the system is
finally running out of resources.

This happens on W2K SP3 if the user is accessing many small files. This
system has sufficient memory.

When processing IRP_MJ_CLEANUP, you should purge it’s cache, which result in a sequent
IRP_MJ_CLOSE request. Then you can get the chance to release your FCB if it’s refer is 0.

My Question: Is it my task to watch the memory usage and finally force CC
to release some files or am I doing something else wrong here?

It’s the duty of OS. Try to execute an application that wants more memory, and see
the results …

Best wishes,

Matt
http://sys.xiloo.com

Hi,

When processing IRP_MJ_CLEANUP, you should purge it’s cache, which result
in a sequent
IRP_MJ_CLOSE request. Then you can get the chance to release your FCB if
it’s refer is 0.

Basically you don’t have to do this, it will affect performance by
introducing additional delays for CloseHandle calls. But you have to call
CcUninitializeCacheMap.

My Question: Is it my task to watch the memory usage and finally force CC
to release some files or am I doing something else wrong here?

You don’t have to do it directly, also calling CcCanIWrite before writing
to cache is an indirect way to tell cache manager to release some files.

Alexei.

Delaying the IRP_MJ_CLOSE call is a good thing if you intend the cache
to have a chance of holding the file data for a subsequent open. Purge
it and lose it. Mm watches (in Windows 2000 and beyond) pool usage and
trims the cache away to induce closes, indirectly releasing pool memory.

CcCanIWrite has nothing to do with anything here. It implements the
write throttle, nothing more.

The memory manager (Mm) is what is holding onto the file cache. Cc
actually has little to do with maintaining the file cache itself …

-----Original Message-----
From: Alexei Jelvis [mailto:xxxxx@mondenet.com]
Sent: Thursday, September 19, 2002 12:10 PM
To: File Systems Developers
Subject: [ntfsd] Re: CM keeps too many files open

Hi,

When processing IRP_MJ_CLEANUP, you should purge it’s cache, which
result
in a sequent
IRP_MJ_CLOSE request. Then you can get the chance to release your FCB
if
it’s refer is 0.

Basically you don’t have to do this, it will affect performance by
introducing additional delays for CloseHandle calls. But you have to
call
CcUninitializeCacheMap.

My Question: Is it my task to watch the memory usage and finally force
CC
to release some files or am I doing something else wrong here?

You don’t have to do it directly, also calling CcCanIWrite before
writing
to cache is an indirect way to tell cache manager to release some files.

Alexei.


You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to %%email.unsub%%