LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-18-2013, 01:54 PM   #1
firask317
LQ Newbie
 
Registered: Feb 2012
Posts: 10

Rep: Reputation: Disabled
Total Memory and Swap Used As Reported by top


Hi there!
I have three questions regarding top command. On my Squid server with 192 GB of DDR RAM, top reports the following:

Mem: 198332816k total, 197818004k used, 514812k free, 987408k buffers

Here are my questions:
1- Why does top see only 198332816k (189.1 GB) of total physical memory (192 GB)?

2- When sorting processes according to their RES (resident memory size), squid is reported to use about 10 GB of the memory, all other processes use about 1GB of memory together. So knowing that top reports most of my physical memory is used, where did this used memory go?

3- I had this question while monitoring top on another recently booted Linux server. top reports that swap usage is 0k, but nevertheless there are many processes with VIRT (Virtual Image) value greater than the resident memory size, which means that, I guess, there must be some swap usage. Would you please explain this to me?

Thanks a lot in advance!
Firas
 
Old 07-18-2013, 02:09 PM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
1/ I think it might be some confusion between GB and GiB,
the same reason a hard drive is never as big as the one you bought

2/ Disk cache http://www.linuxatemyram.com/

3/ best I paste this http://mugurel.sumanariu.ro/linux/th...in-top-output/

basically all the bits of mem it has, video ram, shared libs and so on
 
1 members found this post helpful.
Old 07-18-2013, 03:49 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 11,747

Rep: Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445Reputation: 1445
Wonder if part of that ram is being reserved for video or other bios functions?

Top isn't an exact report as far as I understand. Could be wrong.
 
1 members found this post helpful.
Old 07-18-2013, 05:32 PM   #4
Z038
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 157Reputation: 157
I had never heard of the IEC prefixes (kibi, mebi, gibi, etc.) until about 10 or 12 years ago. I had always considered kilo, mega, and giga prefixes to refer to binary orders of magnitude, kilo meaning 2 to the 10th power, or 1024, mega meaning 2 to the 20th power, or 1024 squared, giga meaning 2 to the 30th power, or 1024 cubed, and so on.

I understand why it is desirable to differentiate between powers of 10 and powers of 2, but I have a hard time using those IEC prefixes after a previous 20 year habit of using the normal prefixes to refer to binary orders of magnitude. I can't help thinking how silly the IEC prefixes sound and look to me. It's a personal problem, I admit. And I know other people who don't find the IEC prefixes odd at all.
 
Old 07-19-2013, 03:31 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,355

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
Anyone who uses Z038 as a handle has been in this business way too long.
 
Old 07-19-2013, 08:32 AM   #6
Z038
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 157Reputation: 157
Well, you got that right syg00, but I think anyone who recognizes that probably has been around a while too. :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Total memory being reported incorrectly l0rddarkf0rce Slackware 15 01-24-2011 08:48 AM
Why doesnt top or free show swap memory usage ? exceed1 Linux - General 15 08-03-2009 08:38 PM
Reported memory usage doesn't tally with top geokker Linux - Server 2 04-04-2008 03:09 PM
Incorrect usercount reported by 'w' and 'top' Yalla-One Slackware 13 07-02-2007 11:48 AM
Memory usage reported using TOP Kdiver58 Linux - Newbie 1 02-03-2003 01:31 PM


All times are GMT -5. The time now is 04:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration