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: Wed, 24 Jul 2024 19:34:16 +0300 Message-ID: <86bk2m7nqv.fsf@gnu.org> References: <87a5i7oqor.fsf@zohomail.eu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28735"; 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 Wed Jul 24 18:34:39 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 1sWewo-0007I0-Lz for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 24 Jul 2024 18:34:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWewX-0002hX-H9; Wed, 24 Jul 2024 12:34:21 -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 1sWewW-0002hK-AY for help-gnu-emacs@gnu.org; Wed, 24 Jul 2024 12:34:20 -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 1sWewW-0003pl-2n for help-gnu-emacs@gnu.org; Wed, 24 Jul 2024 12:34:20 -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=yOlUkEsXKEEEo1VfG4hV3fVuiu3il1VGtuKiEIthlIA=; b=iBMgM9jGTSD7 s+sMCQzTUiMHOfdgLCDj/sIbZ994SDVhZj0gv+1zCUVzhX5wd2aaLfQmzM7NxtklPrRzViCgmHSS/ sUJoVxf2x0GgWAIWJ8UBPn3GWUfQbnwfo49xF/9lb6aPhh9zcA+r9GbH0uPh5hYhNn0+Xbzp7hlXp 6uiD98D7nvPOF4eXiVPh+I6faGN3pmFBTo37Rk9CNp5oGlFO12G5SoqQJCKjbPhHc1bgR47+D0XQ7 IMEwz/NTNu4ExlvklzKARhc4X85Sj1xthVO5KvjU+0qBikC/h9pECfT7XQSLqd1xJeKIi/C28/y9j vCWMkfGZ/a2OrnOUOxiVfg==; In-Reply-To: <87a5i7oqor.fsf@zohomail.eu> (message from Rahguzar on Tue, 23 Jul 2024 21:26:28 +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:147346 Archived-At: > From: Rahguzar > Date: Tue, 23 Jul 2024 21:26:28 +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. If there are systems there with 16KB pages, and /proc reports RSS for them in 16KB pages units and not 4KB page units, then we'd need to modify sysdep.c to multiply by the system's page size instead. Suggest to report this with all the details as a bug, since here is not a good place to discuss this stuff.