Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] top command: meaning of 'm' in memory related values?



Hi,

On Sat, Feb 22, 2014 at 9:02 AM, Raymond Wan <rwan.kyoto@example.com> wrote:
On Sat, Feb 22, 2014 at 7:47 AM, Jim Breen <jimbreen@example.com> wrote:
> I've always thought it meant "megabytes".
>
> The man page says "VIRT  --  Virtual Image (kb)", but I suspect
> it's out-of-date.


Yes and similarly, "g" means gigabytes.  I've seen that a before, too...

The manpage says "VIRT  --  Virtual Memory Size (KiB)"

I would think that all values in top are expressed in (SIC) "kibibytes (KiB), mebibytes (MiB) or gibibytes (GiB)" rather than kilo/mega/gigabytes.

Well, many people use the term kilobyte as 2^10 (1024) bytes, but it is preferred to use the term kibibyte for this, and use kilobyte as 1000 bytes, to avoid confusion.

This means that a "g" for top would be 1 gibibyte = 2^30 bytes = 1073741824bytes (and not 1 gigabyte = 10^9 bytes = 1000000000 bytes).

Again, kilobyte (and mega and giga) is also used as 1024 bytes units (which makes the term having a double meaning, and therefore implies confusion).

Some commands such as "ls" and "df" have options to select 1000 or 1024 powers. For instance on my system:
br@lorien:~$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        45G   14G   30G  31% /
br@lorien:~$ df -H /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        48G   14G   32G  31% /


br.

--
2 + 2 = 5, for very large values of 2.

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links