Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 30 Aug 2014, 14:21
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Process monitors: Htop vs. Top view
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
Dewbie

Joined: 15 Apr 2010
Posts: 1783

PostPosted: Tue 18 Feb 2014, 03:55    Post_subject:  Process monitors: Htop vs. Top view
Sub_title: Which is more accurate?
 

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? Laughing
htop-vs-top_view.png
 Description   
 Filesize   5.45 KB
 Viewed   199 Time(s)

htop-vs-top_view.png

Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8218

PostPosted: Tue 18 Feb 2014, 09:54    Post_subject:  

depends if caching is included or not and such....l only have the RES column showing in htop.

I do find the htop figure matches the one I get from the xfce4 memory monitor so I go with that...its also accurate when the stuff accidentally gets filled up (open a videofile in a test editor Very Happy )

mike
Back to top
View user's profile Send_private_message 
nic007

Joined: 13 Nov 2011
Posts: 674

PostPosted: Tue 18 Feb 2014, 10:18    Post_subject:  

The memory section of Hardinfo system information gives the best break down of memory usage that I've seen.
Back to top
View user's profile Send_private_message 
Moat

Joined: 16 Jul 2013
Posts: 177

PostPosted: Tue 18 Feb 2014, 13:28    Post_subject:  

mikeb wrote:
I do find the htop figure matches the one I get from the xfce4 memory monitor so I go with that...


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?)...??

Score -

htop = 2

top = 0

Smile
Back to top
View user's profile Send_private_message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Thu 20 Feb 2014, 10:22    Post_subject:  

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":
Code:
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.

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:
Code:
man htop

Here is a paragraph from the F.A.Q. page found there:
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).

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_with_numeric_mm.png
 Description   htop after adding a numeric "memory meter"
 Filesize   9.69 KB
 Viewed   123 Time(s)

htop_with_numeric_mm.png

Back to top
View user's profile Send_private_message 
Dewbie

Joined: 15 Apr 2010
Posts: 1783

PostPosted: Fri 21 Feb 2014, 03:21    Post_subject:  

Thanks for the replies. Smile

npierce wrote:
Quote:
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."
Back to top
View user's profile Send_private_message 
mikeb


Joined: 23 Nov 2006
Posts: 8218

PostPosted: Fri 21 Feb 2014, 04:24    Post_subject:  

Have we all been 'used' then Very Happy

mike
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0603s ][ Queries: 13 (0.0061s) ][ GZIP on ]