LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   testin swap out (https://www.linuxquestions.org/questions/linux-kernel-70/testin-swap-out-479426/)

eskuai 09-01-2006 09:08 AM

testing swap out
 
Hello,

I wonder how to know what process in my system are "swap-out" ?
is this possible ?

And, then ..

Can i set a process with "swap-out" ? , for example,
i need a java application that always stays in memory, never in "swap",
howto do that?

I want to test that my application with "swap-out" mode never go to swap,
i think that kernel get "space" swapping anothers applications.

thank you

MensaWater 09-02-2006 10:36 AM

Processes are no longer "swapped out" despite the fact the spaces are still called "swap". Modern Unix/Linux does "page outs" instead where it pages out individual memory pages instead of full processes. It does this based on algorithm that tries to determine what is likely to be used next.

Unless you're really memory constrained or have a really poorly defined application this does not have much impact to performance as you're not really operating at disk speeds the way you did with "swapping out". You really don't want to put everything in memory without paging out as this would constrain your memory and not take advantage of the paging algorithm.

Linux also uses virtual memory that allows you to start far more processes based on a combination of physical memory and swap space. This is because the "memory" required to start a process doesn't really need to be in physical memory. So, you can actually start far more than you could if you relied only on physical memory.

eskuai 09-02-2006 04:46 PM

Thank you for your reply jlightner

My question is about, for example, how can i know what applications are using a lot of memory
and it is using "swap-disk" ? ... i can use top and anothers utilities, but, i wonder if exists
a simple command that display "a list of process which one o some memory page that compose the
process are swapping, staying sometine in disk".

if i write a device drive to a real time system, i have to be sure that never my driver
is swapping to disk because i get a strict plan that use microseconds to do something,
or seconds, but for example, my device drivers test a audio signal four time by second,
if my system send my driver to disk, i got a problem !

then, can i say to kernel ... wow wow, dont touch this process (any memory page of this,
using it or not !!? better try to kill another one ...?

thank you


All times are GMT -5. The time now is 09:31 AM.