Jump to content

Paging File


Recommended Posts

Guest Sid Elbow
Posted

I suspect this is a dumb question but ....

 

I was doing some defragmenting yesterday and elected to have the

page-file defragged as part of the process (PerfectDisk 8). It needed to

do it at boot time so I re-booted and dutifully sat for 10 - 15 min

while the page file was defragged.

 

At this point I began to wonder why this was necessary. I thought the

page file was just to offload the system memory when it gets full. Is

there any data in the page file that needs to survive a reboot? Could a

defrag not consist of simply clearing or deleting/recreating it? (Come

to that, couldn't windows itself do that as part of the boot process)?

  • Replies 9
  • Created
  • Last Reply
Guest John John (MVP)
Posted

Re: Paging File

 

Sid Elbow wrote:

> I suspect this is a dumb question but ....

>

> I was doing some defragmenting yesterday and elected to have the

> page-file defragged as part of the process (PerfectDisk 8). It needed to

> do it at boot time so I re-booted and dutifully sat for 10 - 15 min

> while the page file was defragged.

>

> At this point I began to wonder why this was necessary. I thought the

> page file was just to offload the system memory when it gets full. Is

> there any data in the page file that needs to survive a reboot? Could a

> defrag not consist of simply clearing or deleting/recreating it? (Come

> to that, couldn't windows itself do that as part of the boot process)?

 

No, Windows doesn't do this as part of the booting process. Clearing

the pagefile is something that can be done (for security purposes) but

it has to be done when the computer is shutting down, it can take a lot

of time to clear out the pagefile and this can substantially slow down

the shutdown time. Deleting and recreating the pagefile at every reboot

may or would eventually lead to more fragmentation because of the

usually large size of the file, when Windows boots it reads the pagefile

information at the

HKEY_LOCAL_MACHINE\SYSTEM\ControlSetnnn\Control\Session Manager\Memory

Management registry key to determine the location and size of the

pagefile and it will only create a new file if the file is not conform

to the settings in the key.

 

Having a fragmented pagefile negatively impacts performance during

paging operations, it is best to have the file in a contiguous block or

in as few fragments as possible. It seems to me that Perfect disk may

have taken a bit more time than usual to defragment the file but the

time it takes depends on the size of the file and how heavily fragmented

it was.

 

John

Guest Dave Patrick
Posted

Re: Paging File

 

This link may help.

 

http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/29930.mspx?mfr=true

 

 

 

--

 

Regards,

 

Dave Patrick ....Please no email replies - reply in newsgroup.

Microsoft Certified Professional

Microsoft MVP [Windows]

http://www.microsoft.com/protect

 

 

"Sid Elbow" wrote:

>I suspect this is a dumb question but ....

>

> I was doing some defragmenting yesterday and elected to have the page-file

> defragged as part of the process (PerfectDisk 8). It needed to do it at

> boot time so I re-booted and dutifully sat for 10 - 15 min while the page

> file was defragged.

>

> At this point I began to wonder why this was necessary. I thought the page

> file was just to offload the system memory when it gets full. Is there any

> data in the page file that needs to survive a reboot? Could a defrag not

> consist of simply clearing or deleting/recreating it? (Come to that,

> couldn't windows itself do that as part of the boot process)?

Guest Sid Elbow
Posted

Re: Paging File

 

John John (MVP) wrote:

> No, Windows doesn't do this as part of the booting process. Clearing

> the pagefile is something that can be done (for security purposes) but

> it has to be done when the computer is shutting down, it can take a lot

> of time to clear out the pagefile and this can substantially slow down

> the shutdown time. Deleting and recreating the pagefile at every reboot

> may or would eventually lead to more fragmentation because of the

> usually large size of the file, when Windows boots it reads the pagefile

> information at the

> HKEY_LOCAL_MACHINE\SYSTEM\ControlSetnnn\Control\Session Manager\Memory

> Management registry key to determine the location and size of the

> pagefile and it will only create a new file if the file is not conform

> to the settings in the key.

 

Yes, I realise Windows *doesn't* clear or recreate the pagefile ... I

was just musing that, if it did, it would/should mean that the pagefile

is always in a defragged state at bootup. As long as the pagefile was

deleted and immediately recreated at the same size and in the same

location (it would have to be a contiguous block I guess) then it

shouldn't affect the fragmentation of other files.

Guest Dave Patrick
Posted

Re: Paging File

 

You're welcome.

 

 

--

 

Regards,

 

Dave Patrick ....Please no email replies - reply in newsgroup.

Microsoft Certified Professional

Microsoft MVP [Windows]

http://www.microsoft.com/protect

 

 

"Sid Elbow" wrote:

> That looks interesting. I'll give it a whirl and see how long it takes.

> Thanks, Dave.

Guest John John (MVP)
Posted

Re: Paging File

 

Sid Elbow wrote:

> John John (MVP) wrote:

>

>> No, Windows doesn't do this as part of the booting process. Clearing

>> the pagefile is something that can be done (for security purposes) but

>> it has to be done when the computer is shutting down, it can take a

>> lot of time to clear out the pagefile and this can substantially slow

>> down the shutdown time. Deleting and recreating the pagefile at every

>> reboot may or would eventually lead to more fragmentation because of

>> the usually large size of the file, when Windows boots it reads the

>> pagefile information at the

>> HKEY_LOCAL_MACHINE\SYSTEM\ControlSetnnn\Control\Session Manager\Memory

>> Management registry key to determine the location and size of the

>> pagefile and it will only create a new file if the file is not conform

>> to the settings in the key.

>

>

> Yes, I realise Windows *doesn't* clear or recreate the pagefile ... I

> was just musing that, if it did, it would/should mean that the pagefile

> is always in a defragged state at bootup. As long as the pagefile was

> deleted and immediately recreated at the same size and in the same

> location (it would have to be a contiguous block I guess) then it

> shouldn't affect the fragmentation of other files.

 

Actually, now that I think about it, deleting the pagefile and

recreating it is one way that the file can be defragmented but it takes

two reboots to complete the operation, and of course you need enough

contiguous free space to accommodate the file.

 

John

Guest h.stroph
Posted

[PLAIN]Re: slow shutdown [was: Paging File][/PLAIN]

 

Re: slow shutdown [was: Paging File]

 

In news:um5JyJoFJHA.2076@TK2MSFTNGP04.phx.gbl,

John John (MVP) <audetweld@nbnet.nb.ca> typed:

> No, Windows doesn't do this as part of the booting process. Clearing

> the pagefile is something that can be done (for security purposes) but

> it has to be done when the computer is shutting down, it can take a

> lot of time to clear out the pagefile and this can substantially slow

> down the shutdown time.

 

Maybe that's why our W2k sp4 machine takes so long to shut down -- is there

any way to determine id this is the case and disable it, please?

Guest h.stroph
Posted

[PLAIN]Re: slow shutdown [was: Paging File][/PLAIN]

 

Re: slow shutdown [was: Paging File]

 

In news:gambp4$25k$1@aioe.org, I <h.stroph@yao.corn> typed:

> Maybe that's why our W2k sp4 machine takes so long to shut down -- is

> there any way to determine id this is the case and disable it, please?

 

Thanks, I read the other post that said how to do it.

Guest John John (MVP)
Posted

[PLAIN]Re: slow shutdown [was: Paging File][/PLAIN]

 

Re: slow shutdown [was: Paging File]

 

h.stroph wrote:

> In news:um5JyJoFJHA.2076@TK2MSFTNGP04.phx.gbl,

> John John (MVP) <audetweld@nbnet.nb.ca> typed:

>

>

>>No, Windows doesn't do this as part of the booting process. Clearing

>>the pagefile is something that can be done (for security purposes) but

>>it has to be done when the computer is shutting down, it can take a

>>lot of time to clear out the pagefile and this can substantially slow

>>down the shutdown time.

>

>

> Maybe that's why our W2k sp4 machine takes so long to shut down -- is there

> any way to determine id this is the case and disable it, please?

 

Check the registry settings, Dave Patrick already supplied a link to the

relevant entry:

 

http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/29930.mspx?mfr=true

 

For the slow shutdown look in the Event Log to see if anything is

recorded when you shutdown the machine.

 

John


×
×
  • Create New...