From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rahguzar Newsgroups: gmane.emacs.help Subject: Re: Questions about proced Date: Wed, 24 Jul 2024 18:31:59 +0200 Message-ID: <874j8eoio0.fsf@zohomail.eu> References: <87ed7joqvi.fsf@zohomail.eu> <867cdb82rq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36891"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.1; emacs 29.4 Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 25 04:43:52 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sWoSM-0009Rr-KN for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 25 Jul 2024 04:43:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWoRz-0007d8-TQ; Wed, 24 Jul 2024 22:43:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWeuR-0002Ne-E7 for help-gnu-emacs@gnu.org; Wed, 24 Jul 2024 12:32:13 -0400 Original-Received: from sender-pp-o91.zoho.eu ([136.143.169.91]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWeuP-0003Rw-8w; Wed, 24 Jul 2024 12:32:11 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1721838724; cv=none; d=zohomail.eu; s=zohoarc; b=KDWIAGR6TaFwRajY0x/lKA6F6hoeBJmUFjtFl7nsQjIrcLOo3mpiiA4K17xRDu28UO8Ui3e03JRsaIv4qFxxuFEUcm9ocRNUvgPCzwGd6oYEHpqziIf6Kqn+9zvX5kbFOfdwWJiGdyTjPQV7eQNtz0EdcPg2lEoqwHgCykBvIzs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1721838724; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=nVNpiw9xlY52WpByNknszswZNVXuvA6V2qIs5l3810M=; b=OyAIMMZiwUglgf2pcrkbF9aTothU2lXIJ/Fd29yINZCkCQ9ia0rFHZtOughukxTeOcsSM8sUVh7XnCzUUQx9Wa0uDBokC6X0Kjae5VQXjLiVsSnCK2pgu2n6VcbIRAm5T8LnvK8mZ6+y4nlJKeMQ3ti/BtL1nhg5N76NM0w33Ao= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=zohomail.eu; spf=pass smtp.mailfrom=rahguzar@zohomail.eu; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1721838724; s=zoho; d=zohomail.eu; i=rahguzar@zohomail.eu; h=From:From:To:To:Cc:Cc:Subject:Subject:In-Reply-To:References:Date:Date:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To; bh=nVNpiw9xlY52WpByNknszswZNVXuvA6V2qIs5l3810M=; b=jbtduYh4cKxKG8aKvsGzVvyLzHULObtZZvMeRYmCbrVxo1wtSunGDcGahKyQHa7k XAEclZpuS4Z7/bEt2vp77dwvIycxXm4gTtdoYa5piwQp2hPdnbK14N0CWr30U5S9V/t us9tikf7dPiy2lW7l5HMcv7ILN2qRSDiDlSU2gsE= Original-Received: by mx.zoho.eu with SMTPS id 172183872060313.533435339845141; Wed, 24 Jul 2024 18:32:00 +0200 (CEST) In-Reply-To: <867cdb82rq.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Jul 2024 14:09:45 +0300") X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.169.91; envelope-from=rahguzar@zohomail.eu; helo=sender-pp-o91.zoho.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 24 Jul 2024 22:43:25 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147358 Archived-At: Hi Eli, [Adding the mailing list again since I accidentally forgot it last time.] Eli Zaretskii writes: >> From: Rahguzar >> Date: Tue, 23 Jul 2024 21:22:25 +0200 >> >> > You have the sources (in sysdep.c) of what Emacs does, so you can just >> > look there, and then consult the various system documentation. AFAIR, >> > the %Mem column should show the percentage of the physical RAM that >> > the process's RSS (resident set) takes. That's what I see on 2 >> > different systems, one MS-Windows, the other GNU/Linux. On the latter >> > I compared with 'top', and it shows the same value. So I don't think >> > I understand why you see something different. >> >> Sorry for coming back to this so late. I am using a GNU/Linux but with a >> kernal that has a 16k page size. I think that might be the problem? >> >> I don't understand C at all but I looked at the sysdep.c as weird math. >> What stands out is line 3741: >> >> pmem = 4.0 * 100 * rss / procfs_get_total_memory (); >> >> The 4.0 is what makes me suspicious but it is just a hunch without any >> understanding. > > Like I said: the values I see are consistent with 'top', so I think > whoever wrote that code knew what they were doing. And note that > values of 'rss' are multiplied by 4 everywhere they are used. I think > the reason is clear: the RSS value is given in units of pages, and > each page is 4KB, so to convert that into KB units, you must multiply > by 4. Sorry, I wasn't clear enough but I wanted to say that one my system the each page is 16KB and not 4KB so the multiplication should be by 16 and not 4. This is why for me the value for percentage memory shown by top is 4 times that show by proced.