Date: Tue, 21 Sep 1999 15:42:23 +0200 (MET DST) From: Ivan <Ivan.Djelic@prism.uvsq.fr> To: freebsd-hackers@FreeBSD.org Subject: Out of swap handling and X lockups in 3.2R Message-ID: <Pine.SUN.3.95.990921143939.1924A-100000@bonnard.prism.uvsq.fr>
next in thread | raw e-mail | index | archive | help
Hi, I have a couple of questions about the way 'out of swap' situations are handled in FreeBSD. Not that my system often runs out of swap, I'm just being curious: When the system runs out of swap space, it is supposed to kill the 'biggest' process to regain some space. I wrote a little program to test this behaviour, basically something like /* gradually ask for memory at each key stroke */ while (getchar()) { a = malloc(SIZE); assert(a); memset(a,0,SIZE); } where SIZE was 4 MB in this case. I ran it on the console (I've got 64 MB of RAM and 128 MB of swap) until the swap pager went out of space and my huge process was eventually killed as expected. Fine. But when I ran it under X Window, the system eventually killed the X server (SIZE ~20 MB, RES ~14 MB -- the biggest RES size) instead of my big process (SIZE ~100 MB, RES 0K). My question is: Why was the X server killed ? Was it because the 'biggest' process is the one with the biggest resident memory size ? And if so, why not take into account the total size of processes ? This leads me to another (not related to swap) question: When the X server is killed, the machine simply hangs without any reaction to Ctrl-Alt-F1 or even Ctrl-Alt-Del. Is that the normal behaviour ? (I think it should get the user back to the console ?!) Is there any workaround ? TIA, Ivan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.95.990921143939.1924A-100000>