Long inactivity slows down my certain processes

G

Guest

We have observed some behaviour and would like to have feedback from some one.

One process of our application pulls the data from Database and display it
to the user in the form of a svg chart. it works fine (pretty fast) however
if the system remains inactive for lets say more than 12 hours, and then we
ask the process refresh the data, it slows down and brings data after
considerable delay, same scenario for few more calls and after some time it
starts responding normally.

it works fine on 2000 but on XP we are facing such scenario

I am not sure if it sets priority to some low level to that inactive process

Will be glad if someone rightly points out the problem

Thanks

--Sheraz
 
C

cluberti

The high-level reason for this behavior is due to the way Windows XP's
memory manager is configured to trim the working set of an idle process.
There are built-in threasholds that the memory manager follows, configured
dynamically during boot and based on the amount of physical RAM in the
machine and how much memory the Windows kernel needs after booting, that
determine how long an idle page can be left in memory when a process goes
idle. If a process goes idle for an amount of time (usually a few hours is
going to cause this to happen), the memory manager will "trim" memory pages
from the working set of the process out to the list of pages to be committed
to disk (pagefile). When another amount of time has passed, or other
applications start requesting virtual address space that the memory manager
wants to move into physical RAM, those "trimmed" pages are actually written
to the pagefile and removed from RAM.

When you go to re-use the application, the memory manager then has to
soft-fault (move) those "trimmed" pages back into RAM from the physical disk
(slow operation), and possibly will have to write other "trimmed" pages from
other processes to the disk to free up that space in physical RAM, causing
the operation to be even slower.

In this case, I'd say add more physical RAM to the machine in question, and
also try to lower the number of running processes that also run on this
machine, to reduce the possibility that trimmed pages will need to be moved
to the pagefile.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top