View Single Post
  #12   Report Post  
Posted to uk.d-i-y
Tim Watts[_3_] Tim Watts[_3_] is offline
external usenet poster
 
Posts: 7,434
Default O/T: Ubuntu questions.

On 26/11/15 08:19, News wrote:
In message , Tim Watts
writes

Strictly, "paging" is the above and "swapping" is when the whole idle
process is written out to disk. But in practise the concept and
effects are much the same.


Paging is what Windows shows as Page File Usage, or PF Usage?


I guess - I don't do windows But the OS principles are the same and
by its name, I suspect its the same.

I do look
at the Performance tab of Task Manager, but don't pretend to understand
exactly what I'm looking at. Currently, my CPU usage is hovering around
10% which is probably OK,


Not probably - it's having a stroll, rather than a sprint

but PF Usage is 2.42GB which is probably not
so good.


You need a windows person. Sometimes, it's better to page out large
amounts of dead memory that is never used (unused lumps of data or code
in a program, or at least "unused" in the context of what you are doing
right now) and use the space of disk buffers (cache).

There's also a method of paging that does not use the pagefile - at
least on linux. If you load a program and all its linked code libraries,
the whole lot gets mapped into the process's virtual address space.

However, it tends to not get read in until needed - this happens by the
program and the libraries being mapped as mini pagefiles into the
address maps, but not actually physically read in.

Program goes to the "print" routines (say), trips a page fault - that
causes the same paging code in the kernel to look for the page file
blocks (that this time happen to be the program or library file) and
read them in, resuming the program when done.

In the same way, not-recently-used blocks of the program can simply be
dropped from RAM (no need to write out - code is read-only, we already
have the original in the file) if the system thinks it needs RAM for
something else.

I have no idea if Windows employs that strategy - it's always been my
observation that linux handles memory better than windows, but that's a)
because I hate Windows, b) may be less true with the modern versions.



The fun happens if the kernel needs a page of RAM for its own use,
hasn't got any spare and needs to run the pager to free some, except the
pager needs some extra RAM to do its work.

Real problem - solved in part with the concept of "kernel non paged
pool" (locked pages of RAM that cannot be paged out).

Apologies for stealing this Ubuntu thread. Just to say that I too was a
dedicated Firefox user, but have now dumped it (and Pale Moon) for
Chrome because it eventually caused this little Netbook to freeze. Not
BSOD - it just froze and nothing except the 'off' button and reboot
would work.