From owner-freebsd-current Sun Feb 16 14:48:33 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 106EA37B401 for ; Sun, 16 Feb 2003 14:48:32 -0800 (PST) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E09143F75 for ; Sun, 16 Feb 2003 14:48:31 -0800 (PST) (envelope-from julian@elischer.org) Received: from interjet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by sccrmhc01.attbi.com (sccrmhc01) with ESMTP id <2003021622483000100kkrp5e>; Sun, 16 Feb 2003 22:48:30 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id OAA06492 for ; Sun, 16 Feb 2003 14:48:29 -0800 (PST) Date: Sun, 16 Feb 2003 14:48:27 -0800 (PST) From: Julian Elischer To: FreeBSD current users Subject: resource usage overflow Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the resource usage we have teh following values calculated.. long ru_ixrss; /* integral shared memory size */ long ru_idrss; /* integral unshared data " */ long ru_isrss; /* integral unshared stack " */ in statclock() we have: ru->ru_ixrss += pgtok(vm->vm_tsize); ru->ru_idrss += pgtok(vm->vm_dsize); ru->ru_isrss += pgtok(vm->vm_ssize); in other words these ore incremented at the rate of statclock (for example 1kHz in not unheard of now). Assuming that I have a 600MB process (e.g. fsck doing a 1TB fileesyste uses 667MB in pass 1 alone). this means that the number of ticks we can count this amount of memory usage for is: 4E9/6E5 = 7.1E3 or 7100 ticks or, in the realworld (TM)... seven seconds if I am doing stats and profiling at 1kHz. I think I could make a case for these figures being extended to 64 bits but: 1/ is it worth it? what uses them? Easier to drop them. 2/ are these mandated by any standard? would making them 64 bits break anything? 3/ would 64 bits be enough? We are getting both bigger and faster 64000 times faster and 64000 times bigger and we are back at seven seconds. 640 times faster and 640 times bigger and we are still only at 70000 seconds (19 hours) before overflow. Julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message