Fcbs occupy too much memory.

Dear all,

I met a headachy trouble in developing my ext2fsd. When copying files from the ext2 partition, too many Fcbs will be created and much memory will be allocated for them, then the situation of insufficient memory will happen.

As we know, the Fcb will be freed when an IRP_MJ_CLOSE request arrives. But is there other way to free them or limit the maximum of Fcbs ?

Best wishes,

Matt
http://sys.xiloo.com

Hi Matt,
Do you allocate the entire FCB from non-paged
memory? You don’t have to do that. Just the Section
object pointers and stuff (I forgot the structure’s
name :wink: ) need to be in non-paged memory - except
ofcourse, in the case of page files.
If you try to minimise your use of non-paged
memory, you should be able to easily avoid running out
of memory.
Hope that helps. :wink:
Manoj

— Matt Wu wrote: > Dear all,
>
> I met a headachy trouble in developing my ext2fsd.
> When copying files from the ext2 partition, too many
> Fcbs will be created and much memory will be
> allocated for them, then the situation of
> insufficient memory will happen.
>
> As we know, the Fcb will be freed when an
> IRP_MJ_CLOSE request arrives. But is there other way
> to free them or limit the maximum of Fcbs ?
>
> Best wishes,
>
> Matt
> http://sys.xiloo.com
>

=====
-----------------------------------
Manoj Paul Joseph,
Master of Computer Applications (final year student),
School of Computer Science and Engineering,
Anna University,
Chennai (Madras),
India.

________________________________________________________________________
Everything you always wanted to know about cars and bikes,now
at: http://in.autos.yahoo.com/cricket/tracker.html

Manoj Paul Joseph,

Thanks.

I’ve got the reason. It’s due to “drvier verifier”. I enabled the item “Low resources simulation”.

Thanks and best wishes,

Matt
http://sys.xiloo.com

> Do you allocate the entire FCB from non-paged
>memory? You don’t have to do that. Just the Section
>object pointers and stuff (I forgot the structure’s
>name :wink: ) need to be in non-paged memory - except
>ofcourse, in the case of page files.
> If you try to minimise your use of non-paged
>memory, you should be able to easily avoid running out
>of memory.
>Hope that helps. :wink:
>Manoj
>
> — Matt Wu wrote: > Dear all,
>>
>> I met a headachy trouble in developing my ext2fsd.
>> When copying files from the ext2 partition, too many
>> Fcbs will be created and much memory will be
>> allocated for them, then the situation of
>> insufficient memory will happen.
>>
>> As we know, the Fcb will be freed when an
>> IRP_MJ_CLOSE request arrives. But is there other way
>> to free them or limit the maximum of Fcbs ?
>>
>> Best wishes,
>>
>> Matt
>> http://sys.xiloo.com
>>
>
>
>=====
>-----------------------------------
>Manoj Paul Joseph,
>Master of Computer Applications (final year student),
>School of Computer Science and Engineering,
>Anna University,
>Chennai (Madras),
>India.
>
> ________________________________________________________________________
>Everything you always wanted to know about cars and bikes,now
> at: http://in.autos.yahoo.com/cricket/tracker.html
>
>—
>You are currently subscribed to ntfsd as: mattwu@163.com
>To unsubscribe send a blank email to %%email.unsub%%

The original problem was solved, but a new one arrives.

After I copied many files (Backup of Winxp 2600 Disc), there were still 0x2d2 Fcbs active, even if the copying already finished for a long time.

Why didn’t the system (explorer) send the IRP_MJ_CLOSE to my fsd ? Or there might be errors in the fsd ?

Does anyone have a clue ?

Thanks in advance,

Matt
http://sys.xiloo.com

>I’ve got the reason. It’s due to “drvier verifier”. I enabled the item “Low resources simulation”.
>
>Thanks and best wishes,
>
>Matt
>http://sys.xiloo.com
>
>
>
>> Do you allocate the entire FCB from non-paged
>>memory? You don’t have to do that. Just the Section
>>object pointers and stuff (I forgot the structure’s
>>name :wink: ) need to be in non-paged memory - except
>>ofcourse, in the case of page files.
>> If you try to minimise your use of non-paged
>>memory, you should be able to easily avoid running out
>>of memory.
>>Hope that helps. :wink:
>>Manoj
>>
>> — Matt Wu wrote: > Dear all,
>>>
>>> I met a headachy trouble in developing my ext2fsd.
>>> When copying files from the ext2 partition, too many
>>> Fcbs will be created and much memory will be
>>> allocated for them, then the situation of
>>> insufficient memory will happen.
>>>
>>> As we know, the Fcb will be freed when an
>>> IRP_MJ_CLOSE request arrives. But is there other way
>>> to free them or limit the maximum of Fcbs ?
>>>
>>> Best wishes,
>>>
>>> Matt
>>> http://sys.xiloo.com
>>>
>>
>>
>>=====
>>-----------------------------------
>>Manoj Paul Joseph,
>>Master of Computer Applications (final year student),
>>School of Computer Science and Engineering,
>>Anna University,
>>Chennai (Madras),
>>India.
>>
>> ________________________________________________________________________
>>Everything you always wanted to know about cars and bikes,now
>> at: http://in.autos.yahoo.com/cricket/tracker.html
>>
>>—
>>You are currently subscribed to ntfsd as: mattwu@163.com
>>To unsubscribe send a blank email to %%email.unsub%%
>
>
>
>—
>You are currently subscribed to ntfsd as: mattwu@163.com
>To unsubscribe send a blank email to %%email.unsub%%

Possibly all those FCBs are in the cache, Flush the cache
and they well disappear.

RSA Security
Henry Padilla
Engineer

-----Original Message-----
From: Matt Wu [mailto:mattwu@163.com]
Sent: Monday, May 27, 2002 7:00 PM
To: File Systems Developers
Subject: [ntfsd] Re: Fcbs occupy too much memory.

The original problem was solved, but a new one arrives.

After I copied many files (Backup of Winxp 2600 Disc), there were still
0x2d2 Fcbs active, even if the copying already finished for a long time.

Why didn’t the system (explorer) send the IRP_MJ_CLOSE to my fsd ? Or there
might be errors in the fsd ?

Does anyone have a clue ?

Thanks in advance,

Matt
http://sys.xiloo.com

>I’ve got the reason. It’s due to “drvier verifier”. I enabled the item “Low
resources simulation”.
>
>Thanks and best wishes,
>
>Matt
>http://sys.xiloo.com
>
>
>
>> Do you allocate the entire FCB from non-paged
>>memory? You don’t have to do that. Just the Section
>>object pointers and stuff (I forgot the structure’s
>>name :wink: ) need to be in non-paged memory - except
>>ofcourse, in the case of page files.
>> If you try to minimise your use of non-paged
>>memory, you should be able to easily avoid running out
>>of memory.
>>Hope that helps. :wink:
>>Manoj
>>
>> — Matt Wu wrote: > Dear all,
>>>
>>> I met a headachy trouble in developing my ext2fsd.
>>> When copying files from the ext2 partition, too many
>>> Fcbs will be created and much memory will be
>>> allocated for them, then the situation of
>>> insufficient memory will happen.
>>>
>>> As we know, the Fcb will be freed when an
>>> IRP_MJ_CLOSE request arrives. But is there other way
>>> to free them or limit the maximum of Fcbs ?
>>>
>>> Best wishes,
>>>
>>> Matt
>>> http://sys.xiloo.com
>>>
>>
>>
>>=====
>>-----------------------------------
>>Manoj Paul Joseph,
>>Master of Computer Applications (final year student),
>>School of Computer Science and Engineering,
>>Anna University,
>>Chennai (Madras),
>>India.
>>
>> ________________________________________________________________________
>>Everything you always wanted to know about cars and bikes,now
>> at: http://in.autos.yahoo.com/cricket/tracker.html
>>
>>—
>>You are currently subscribed to ntfsd as: mattwu@163.com
>>To unsubscribe send a blank email to %%email.unsub%%
>
>
>
>—
>You are currently subscribed to ntfsd as: mattwu@163.com
>To unsubscribe send a blank email to %%email.unsub%%


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

You cannot, any open file must have a FCB.

----- Original Message -----
From: “Matt Wu”
To: “File Systems Developers”
Sent: Tuesday, May 28, 2002 7:30 AM
Subject: [ntfsd] Fcbs occupy too much memory.

> Dear all,
>
> I met a headachy trouble in developing my ext2fsd. When copying
files from the ext2 partition, too many Fcbs will be created and much
memory will be allocated for them, then the situation of insufficient
memory will happen.
>
> As we know, the Fcb will be freed when an IRP_MJ_CLOSE request
arrives. But is there other way to free them or limit the maximum of
Fcbs ?
>
> Best wishes,
>
> Matt
> http://sys.xiloo.com
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>

Have you terminated the caching on CLEANUP?

----- Original Message -----
From: “Matt Wu”
To: “File Systems Developers”
Sent: Tuesday, May 28, 2002 2:00 PM
Subject: [ntfsd] Re: Fcbs occupy too much memory.

> The original problem was solved, but a new one arrives.
>
> After I copied many files (Backup of Winxp 2600 Disc), there were
still 0x2d2 Fcbs active, even if the copying already finished for a
long time.
>
> Why didn’t the system (explorer) send the IRP_MJ_CLOSE to my fsd ?
Or there might be errors in the fsd ?
>
> Does anyone have a clue ?
>
>
> Thanks in advance,
>
> Matt
> http://sys.xiloo.com
>
>
> >I’ve got the reason. It’s due to “drvier verifier”. I enabled the
item “Low resources simulation”.
> >
> >Thanks and best wishes,
> >
> >Matt
> >http://sys.xiloo.com
> >
> >
> >
> >> Do you allocate the entire FCB from non-paged
> >>memory? You don’t have to do that. Just the Section
> >>object pointers and stuff (I forgot the structure’s
> >>name :wink: ) need to be in non-paged memory - except
> >>ofcourse, in the case of page files.
> >> If you try to minimise your use of non-paged
> >>memory, you should be able to easily avoid running out
> >>of memory.
> >>Hope that helps. :wink:
> >>Manoj
> >>
> >> — Matt Wu wrote: > Dear all,
> >>>
> >>> I met a headachy trouble in developing my ext2fsd.
> >>> When copying files from the ext2 partition, too many
> >>> Fcbs will be created and much memory will be
> >>> allocated for them, then the situation of
> >>> insufficient memory will happen.
> >>>
> >>> As we know, the Fcb will be freed when an
> >>> IRP_MJ_CLOSE request arrives. But is there other way
> >>> to free them or limit the maximum of Fcbs ?
> >>>
> >>> Best wishes,
> >>>
> >>> Matt
> >>> http://sys.xiloo.com
> >>>
> >>
> >>
> >>=====
> >>-----------------------------------
> >>Manoj Paul Joseph,
> >>Master of Computer Applications (final year student),
> >>School of Computer Science and Engineering,
> >>Anna University,
> >>Chennai (Madras),
> >>India.
> >>
>
>> ________________________________________________________________

> >>Everything you always wanted to know about cars and bikes,now
> >> at: http://in.autos.yahoo.com/cricket/tracker.html
> >>
> >>—
> >>You are currently subscribed to ntfsd as: mattwu@163.com
> >>To unsubscribe send a blank email to %%email.unsub%%
> >
> >
> >
> >—
> >You are currently subscribed to ntfsd as: mattwu@163.com
> >To unsubscribe send a blank email to %%email.unsub%%
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>

Even if he has called CcUninitializeCacheMap for these FCB’s, the VM system may hang onto them for a while, anticipating that an application may re-open the files. The caching behavior of the system is not solely implemented in the cache manager. In fact, the cache manager depends on the virtual memory manager for a lot of its behavior. I’ve seen the virtual system hang on to more than 0x2d2 FCB’s. This is typical behavior.

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, May 28, 2002 9:02 AM
To: File Systems Developers
Subject: [ntfsd] Re: Fcbs occupy too much memory.

Have you terminated the caching on CLEANUP?

----- Original Message -----
From: “Matt Wu”
To: “File Systems Developers”
Sent: Tuesday, May 28, 2002 2:00 PM
Subject: [ntfsd] Re: Fcbs occupy too much memory.

> The original problem was solved, but a new one arrives.
>
> After I copied many files (Backup of Winxp 2600 Disc), there were
still 0x2d2 Fcbs active, even if the copying already finished for a
long time.
>
> Why didn’t the system (explorer) send the IRP_MJ_CLOSE to my fsd ?
Or there might be errors in the fsd ?
>
> Does anyone have a clue ?
>
>
> Thanks in advance,
>
> Matt
> http://sys.xiloo.com
>
>
> >I’ve got the reason. It’s due to “drvier verifier”. I enabled the
item “Low resources simulation”.
> >
> >Thanks and best wishes,
> >
> >Matt
> >http://sys.xiloo.com
> >
> >
> >
> >> Do you allocate the entire FCB from non-paged
> >>memory? You don’t have to do that. Just the Section
> >>object pointers and stuff (I forgot the structure’s
> >>name :wink: ) need to be in non-paged memory - except
> >>ofcourse, in the case of page files.
> >> If you try to minimise your use of non-paged
> >>memory, you should be able to easily avoid running out
> >>of memory.
> >>Hope that helps. :wink:
> >>Manoj
> >>
> >> — Matt Wu wrote: > Dear all,
> >>>
> >>> I met a headachy trouble in developing my ext2fsd.
> >>> When copying files from the ext2 partition, too many
> >>> Fcbs will be created and much memory will be
> >>> allocated for them, then the situation of
> >>> insufficient memory will happen.
> >>>
> >>> As we know, the Fcb will be freed when an
> >>> IRP_MJ_CLOSE request arrives. But is there other way
> >>> to free them or limit the maximum of Fcbs ?
> >>>
> >>> Best wishes,
> >>>
> >>> Matt
> >>> http://sys.xiloo.com
> >>>
> >>
> >>
> >>=====
> >>-----------------------------------
> >>Manoj Paul Joseph,
> >>Master of Computer Applications (final year student),
> >>School of Computer Science and Engineering,
> >>Anna University,
> >>Chennai (Madras),
> >>India.
> >>
>
>> ________________________________________________________________

> >>Everything you always wanted to know about cars and bikes,now
> >> at: http://in.autos.yahoo.com/cricket/tracker.html
> >>
> >>—
> >>You are currently subscribed to ntfsd as: mattwu@163.com
> >>To unsubscribe send a blank email to %%email.unsub%%
> >
> >
> >
> >—
> >You are currently subscribed to ntfsd as: mattwu@163.com
> >To unsubscribe send a blank email to %%email.unsub%%
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>


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

Maxim S. Shatskih,

Have you terminated the caching on CLEANUP?

No. I do “CcUninitializeCacheMap” when the fcb is to be freed, i.e. during processing the last IRP_MJ_CLOSE.

Matt

----- Original Message -----
From: “Matt Wu”
>To: “File Systems Developers”
>Sent: Tuesday, May 28, 2002 2:00 PM
>Subject: [ntfsd] Re: Fcbs occupy too much memory.
>
>
>> The original problem was solved, but a new one arrives.
>>
>> After I copied many files (Backup of Winxp 2600 Disc), there were
>still 0x2d2 Fcbs active, even if the copying already finished for a
>long time.
>>
>> Why didn’t the system (explorer) send the IRP_MJ_CLOSE to my fsd ?
>Or there might be errors in the fsd ?
>>
>> Does anyone have a clue ?
>>
>>
>> Thanks in advance,
>>
>> Matt
>> http://sys.xiloo.com
>>
>>
>> >I’ve got the reason. It’s due to “drvier verifier”. I enabled the
>item “Low resources simulation”.
>> >
>> >Thanks and best wishes,
>> >
>> >Matt
>> >http://sys.xiloo.com
>> >
>> >
>> >
>> >> Do you allocate the entire FCB from non-paged
>> >>memory? You don’t have to do that. Just the Section
>> >>object pointers and stuff (I forgot the structure’s
>> >>name :wink: ) need to be in non-paged memory - except
>> >>ofcourse, in the case of page files.
>> >> If you try to minimise your use of non-paged
>> >>memory, you should be able to easily avoid running out
>> >>of memory.
>> >>Hope that helps. :wink:
>> >>Manoj
>> >>
>> >> — Matt Wu wrote: > Dear all,
>> >>>
>> >>> I met a headachy trouble in developing my ext2fsd.
>> >>> When copying files from the ext2 partition, too many
>> >>> Fcbs will be created and much memory will be
>> >>> allocated for them, then the situation of
>> >>> insufficient memory will happen.
>> >>>
>> >>> As we know, the Fcb will be freed when an
>> >>> IRP_MJ_CLOSE request arrives. But is there other way
>> >>> to free them or limit the maximum of Fcbs ?
>> >>>
>> >>> Best wishes,
>> >>>
>> >>> Matt
>> >>> http://sys.xiloo.com
>> >>>
>> >>
>> >>
>> >>=====
>> >>-----------------------------------
>> >>Manoj Paul Joseph,
>> >>Master of Computer Applications (final year student),
>> >>School of Computer Science and Engineering,
>> >>Anna University,
>> >>Chennai (Madras),
>> >>India.
>> >>
>>
>>> ________________________________________________________________
>

>> >>Everything you always wanted to know about cars and bikes,now
>> >> at: http://in.autos.yahoo.com/cricket/tracker.html
>> >>
>> >>—
>> >>You are currently subscribed to ntfsd as: mattwu@163.com
>> >>To unsubscribe send a blank email to %%email.unsub%%
>> >
>> >
>> >
>> >—
>> >You are currently subscribed to ntfsd as: mattwu@163.com
>> >To unsubscribe send a blank email to %%email.unsub%%
>>
>>
>>
>> —
>> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
>> To unsubscribe send a blank email to %%email.unsub%%
>>
>
>
>You are currently subscribed to ntfsd as: mattwu@163.com
>To unsubscribe send a blank email to %%email.unsub%%

>>Have you terminated the caching on CLEANUP?

No. I do “CcUninitializeCacheMap” when the fcb is to be freed, i.e.
during processing the last IRP_MJ_CLOSE.

Matt

Hi,
You will not get IRP_MJ_CLOSE for file object that was used first to
initialize cache for this fcb before you call CcUninitializeCacheMap. For
data files (not directories) you have to call this function during
cleanup.

Alexei.