From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Questions about proced Date: Sun, 07 Apr 2024 19:09:54 +0300 Message-ID: <86r0fhyx0t.fsf@gnu.org> References: <875xwt89f7.fsf@zohomail.eu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2753"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 07 18:10:36 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 1rtV6J-0000V2-Rb for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 07 Apr 2024 18:10:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtV5k-0008LD-7V; Sun, 07 Apr 2024 12:10:00 -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 1rtV5i-0008KV-Or for help-gnu-emacs@gnu.org; Sun, 07 Apr 2024 12:09:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtV5i-0001Ms-GW for help-gnu-emacs@gnu.org; Sun, 07 Apr 2024 12:09:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vDjUbv8PJmKUO9U2MgaIo8mx/kGpJtSu4q1A/P7lvSI=; b=jrBbmUS7NMbp lbwazrnKk4uaYRlbY984LEp5OPhKGkigaVchbay7YgE5AJM6BhV4PHJUvcRWEvODktuZKnVznBmMK COdnIeAb3ala0Ycbt9d3pQxJ+JmrUYzgoKM70Y5D8f98BNS1ilXq1Tg5OiXTYplQQmsJMTg0fajhm iN+F+4ETo4q1WLZsIlO+adnvrG8P/haW4TWG1lr+RQGe1I+Y7zDj2D3kkA1wi++EX3KnTrfLtkDYk OjnzXSAfpdoD36MeDQ/69217gLs2sM3yvnjVd00/DV6DOGTzCCfymN/GAYrQn4F5/zLnJIGt0E0Dv kedfChaQB0olClKU8XRS2g==; In-Reply-To: <875xwt89f7.fsf@zohomail.eu> (message from Rahguzar on Sun, 07 Apr 2024 17:33:50 +0200) 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:146269 Archived-At: > From: Rahguzar > Cc: help-gnu-emacs@gnu.org > Date: Sun, 07 Apr 2024 17:33:50 +0200 > > Hi Eli, > > > I'm not sure I understand: you do have rss in the attributes, and I > > presume that the amount of physical RAM in the system is well known, > > so why is it a problem? > > It is a minor problem but I actually don't understand how proced is > calculating the percentage. If I compare the percentage memory value > from proced with that of top I see that top show a value 4 times that of > proced. Before noticing this I though it was due to proced including > swap but the amount swap is half the amount of ram so I would have > expected the factor to be 1.5. Other programs also show values very > similar to top. The problem is that if I don't remember this fact, I > don't catch the high memory usage. 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. > > > 2) The pcpu construct displays the percentage of cpu used by a process. > > > However it seems like it uses a very long interval to calculate this > > > percentage. So often processes which are basically idle now show up at > > > the top when sorting the processes by pcpu and I can see the cpu used by > > > them decaying slowly. Is it possible to use a shorter interval for pcpu? > > > AFAIK, this is calculated by the OS, not by Emacs. > > Comparing with top, I notice that value is top changes much more quickly > compared to proced and better reflects the current load. The amount of > total cpu time used by a process is identical between top and proced so > I had assumed that they differed by how the calculated the current load. You need to tell more details, like which process you are looking at in the list (better not be the Emacs process which shows the Proced display, for obvious reasons), whether you enabled auto-update in Proced and with what update interval, etc. etc.