Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


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

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!
Old 07-18-2013, 02:09 PM   #2
Senior Member
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,258

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
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

3/ best I paste this

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
Registered: Mar 2008
Posts: 10,246

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
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
Registered: Jan 2006
Distribution: Slackware
Posts: 767

Rep: Reputation: 154Reputation: 154
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
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,796

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

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


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 10:48 PM.

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