From owner-freebsd-hackers Wed Oct 30 17:38:25 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA16333 for hackers-outgoing; Wed, 30 Oct 1996 17:38:25 -0800 (PST) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA16327 for ; Wed, 30 Oct 1996 17:38:17 -0800 (PST) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.8.2/8.8.2) with SMTP id RAA00215 for ; Wed, 30 Oct 1996 17:35:32 -0800 (PST) Message-ID: <3278025C.41C67EA6@whistle.com> Date: Wed, 30 Oct 1996 17:35:24 -0800 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0b6 (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: hackers@freebsd.org Subject: "Thrashing" index Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Does anyone have any ideas on how to describe or detirmine the amount of thrashing going on on a machine? one thing I can think of would be to count the number of processes sitting in 'vmwait' state, or to look at teh page-in and page-out numbers, but hte problem with the second approach is that you need to look twice separated by a time period, to detirmine if the system is doing a lot of work and should not be asked to do more... basically I'm trying to make the system self limit when memory starts to become in short supply, in combination with a few other events. for example.. If the cpu idle time is high, but there is not much memory free, and there are processes in vmwait, then it's probably not a good idea to launch more processes, as the system is probably thrashing.. another index might be to find out how long it takes to allocate an 8K region or similar.. but I think I'd like to find some way that you can look at (say) 3 or 4 static indeces instantly available (e.g. through /proc or sysctl) and munge them into a go/no-go decision for launching more work. julian