I've noticed a sizable difference in displayed memory usage, pretty much every time, even with different Puppies.
Which one is more accurate?
Should I just add 'em up and divide by two?
Process monitors: Htop vs. Top view
Process monitors: Htop vs. Top view
- Attachments
-
- htop-vs-top_view.png
- (5.45 KiB) Downloaded 271 times
I find htop to match what I'm seeing in LXtask and LXpanel's memory meter, as well. Top might be displaying virtual memory vs. how much physical RAM is actually in use (RSS?)...??mikeb wrote:I do find the htop figure matches the one I get from the xfce4 memory monitor so I go with that...
Score -
htop = 2
top = 0
As mikeb said, it depends upon what is included in the value.
The memory data provided by the htop utility is actually consistent with the memory data provided by the top utility. The problem is that it is labeled incorrectly by htop.
Pressing F1 for help in htop shows the format of the "memory meter":
Memory is either in use or it is free. So total memory minus free memory equals used memory. The confusion results from the fact that the htop utility uses its own definition for "used" memory. Because some of the memory which is in use by the kernel for cache or buffers can be released by the kernel if processes need more memory, the author of htop decided to (by default) display only the memory used by processes, not cache or buffers, and feels that "the number displayed by htop is a more meaningful metric of resources used". He may be right that it is more meaningful, but should have given it a better label, since that memory is not the only memory being used. Calling it simply "used" causes confusion.
In some Puppies, entering this command will bring you to the htop web pages:
Here is a paragraph from the F.A.Q. page found there:
The memory data provided by the htop utility is actually consistent with the memory data provided by the top utility. The problem is that it is labeled incorrectly by htop.
Pressing F1 for help in htop shows the format of the "memory meter":
Code: Select all
Memory bar: [used/buffers/cache used/total]
Swap bar: [used/buffers/cache used/total]
Type and layout of header meters are configurable in the setup screen.
In some Puppies, entering this command will bring you to the htop web pages:
Code: Select all
man htop
In the attached screenshot you can see that I've added a second "memory meter" to display values for buffers and cache, as mentioned in the quoted paragraph.htop: Frequently Asked Questions wrote:The number showed by the memory meter is the total memory used by processes. The additional available memory is used by the Linux kernel for buffering and disk cache, so in total almost the entire memory is in use by the kernel. I believe the number displayed by htop is a more meaningful metric of resources used: the number corresponds to the green bars; the blue and brown bars correspond to buffers and cache, respectively (as explained in the Help screen accessible through the F1 key). Numeric data about these is also available when configuring the memory meter to display as text (in the Setup screen, F2).
- Attachments
-
- htop_with_numeric_mm.png
- htop after adding a numeric "memory meter"
- (9.69 KiB) Downloaded 198 times
Thanks for the replies.
npierce wrote:
Exactly. It would be less confusing if Htop used actual numbers for used/buffers/cache/total.
Top view apparently considers total as "used."
npierce wrote:
He may be right that it is more meaningful, but should have given it a better label, since that memory is not the only memory being used. Calling it simply "used" causes confusion.
Exactly. It would be less confusing if Htop used actual numbers for used/buffers/cache/total.
Top view apparently considers total as "used."