<div dir="auto">Ray <div dir="auto"><br></div><div dir="auto">I'm also on Ubuntu. I'll try the same test, but do it with and without swap on (e.g. by running the swapoff and swapon commands first). To complicate things I also don't know if the swapiness level makes a difference.</div><div dir="auto"><br></div><div dir="auto">Thanks</div><div dir="auto">Ashton</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Sep 23, 2018, 7:48 AM Raymond Wan <<a href="mailto:rwan.work@gmail.com" target="_blank" rel="noreferrer">rwan.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Chris,<br>
<br>
<br>
On Sunday, September 23, 2018 09:34 AM, Chris Samuel wrote:<br>
> On Saturday, 22 September 2018 4:19:09 PM AEST Raymond Wan wrote:<br>
> <br>
>> SLURM's ability to suspend jobs must be storing the state in a<br>
>> location outside of this 512 GB. So, you're not helping this by<br>
>> allocating more swap.<br>
> <br>
> I don't believe that's the case. My understanding is that in this mode it's<br>
> just sending processes SIGSTOP and then launching the incoming job so you<br>
> should really have enough swap for the previous job to get swapped out to in<br>
> order to free up RAM for the incoming job.<br>
<br>
<br>
Hmmmmmm, I'm way out of my comfort zone but I am curious <br>
about what happens. Unfortunately, I don't think I'm able <br>
to read kernel code, but someone here <br>
(<a href="https://stackoverflow.com/questions/31946854/how-does-sigstop-work-in-linux-kernel" rel="noreferrer noreferrer noreferrer" target="_blank">https://stackoverflow.com/questions/31946854/how-does-sigstop-work-in-linux-kernel</a>) <br>
seems to suggest that SIGSTOP and SIGCONT moves a process <br>
between the runnable and waiting queues.<br>
<br>
I'm not sure if I did the correct test, but I wrote a C <br>
program that allocated a lot of memory:<br>
<br>
-----<br>
#include <stdlib.h><br>
<br>
#define memsize 160000000<br>
<br>
int main () {<br>
char *foo = NULL;<br>
<br>
foo = (char *) malloc (sizeof (char) * memsize);<br>
<br>
for (int i = 0; i < memsize; i++) {<br>
foo[i] = 0;<br>
}<br>
<br>
do {<br>
} while (1);<br>
}<br>
-----<br>
<br>
Then, I ran it and sent a SIGSTOP to it. According to htop <br>
(I don't know if it's correct), it seems to still be <br>
occupying memory, but just not any CPU cycles.<br>
<br>
Perhaps I've done something wrong? I did read elsewhere <br>
that how SIGSTOP is treated can vary from system to <br>
system... I happen to be on an Ubuntu system.<br>
<br>
Ray<br>
<br>
<br>
<br>
</blockquote></div>