Re: sort causes page faults on server machine
nothing to wonder about Martin. if an application commits some memory --
which obviously is a must for sorting -- the page-tables will be created but
tagged as non-present. that means the memory is mapped in virtual memory but
doesn't point to any physical memory.
if the application now accesses (r/w) one of this non-present pages, the
processor generates an exception (14) and calls the os page fault handler.
this handler now, will allocate a physical memory page and setup the
page-table-entry that it points to this physical page. on the handler
return, the causing instruction will be restarted and the memory access will
succeed.
since the os keeps tracks of various page-fault-counters, you will see this
on-demand-allocation in a raising number of page faults.
the background is that most programmers do over-commits. instead to geting
the file size and allocating exactly this amount of memory, they e.g. alloc
1MB memory to read in a 3k configuration file. with this on demapand
allocation, the system will only give away that much physical memory to the
process, as the application has touched and the remeaning memory can used
for caching still.
-jolt
"J?ns M?rtin Schl?tt?r" <KmoEfrUewEbx@spammotel.com> schrieb im Newsbeitrag
news:vImTVl25inkn-pn2-r0B5DztOIJrQ@registered.motzarella.org...
> We have a win 2003 server which is accessed by multiple clients
> (around 10) by RDP.
> The machine has 4GB memory.
> When we start a SAS sort, the performance monitor shows a lot of page
> faults, but the machine has still 2GB memory available.
>
> Why does a process experience page faults when there is plenty of
> memory free?
>
> Martin
>