From owner-freebsd-hackers Tue Sep 21 6:42:36 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from soleil.uvsq.fr (soleil.uvsq.fr [193.51.24.1]) by hub.freebsd.org (Postfix) with ESMTP id 80B6B1512C for ; Tue, 21 Sep 1999 06:42:30 -0700 (PDT) (envelope-from Ivan.Djelic@prism.uvsq.fr) Received: from lucifer.prism.uvsq.fr (lucifer.prism.uvsq.fr [193.51.25.7]) by soleil.uvsq.fr (8.9.3/jtpda-5.3.2) with ESMTP id PAA70645 for ; Tue, 21 Sep 1999 15:42:26 +0200 (CEST) Received: from bonnard.prism.uvsq.fr (bonnard.prism.uvsq.fr [193.51.25.81]) by lucifer.prism.uvsq.fr (8.9.3/jtpda-5.3.2) with ESMTP id PAA01285 for ; Tue, 21 Sep 1999 15:42:26 +0200 (MET DST) Received: from localhost (djelic@localhost) by bonnard.prism.uvsq.fr (8.8.4/jtpda-5.2) with SMTP id PAA01933 for ; Tue, 21 Sep 1999 15:42:24 +0200 (MET DST) Date: Tue, 21 Sep 1999 15:42:23 +0200 (MET DST) From: Ivan To: freebsd-hackers@FreeBSD.org Subject: Out of swap handling and X lockups in 3.2R Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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