From: Rahguzar <rahguzar@zohomail.eu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Questions about proced
Date: Wed, 24 Jul 2024 18:31:59 +0200 [thread overview]
Message-ID: <874j8eoio0.fsf@zohomail.eu> (raw)
In-Reply-To: <867cdb82rq.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Jul 2024 14:09:45 +0300")
Hi Eli,
[Adding the mailing list again since I accidentally forgot it last
time.]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Rahguzar <rahguzar@zohomail.eu>
>> 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.
next parent reply other threads:[~2024-07-24 16:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87ed7joqvi.fsf@zohomail.eu>
[not found] ` <867cdb82rq.fsf@gnu.org>
2024-07-24 16:31 ` Rahguzar [this message]
2024-07-24 17:41 Questions about proced Rahguzar
-- strict thread matches above, loose matches on Subject: below --
2024-07-23 19:26 Rahguzar
2024-07-24 16:34 ` Eli Zaretskii
2024-04-07 15:33 Rahguzar
2024-04-07 16:09 ` Eli Zaretskii
2024-04-06 9:57 Rahguzar
2024-04-06 17:47 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874j8eoio0.fsf@zohomail.eu \
--to=rahguzar@zohomail.eu \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).