octave-maintainers
[Top][All Lists]
Advanced

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

Discrepancy between actual RAM usage by Octave and "whos" output


From: PhilipNienhuis
Subject: Discrepancy between actual RAM usage by Octave and "whos" output
Date: Sun, 28 Oct 2018 11:05:44 -0500 (CDT)

Hi,

(Just curious)
During a recent debug session I noted that Octave's RAM usage is much bigger
than suggested by the "whos" command.
I used a 10,000,000x10 heterogeneous cell array [*] to experiment. Big but
not extreme, some GIS files I sometimes use altogether also lead to several
GBs of RAM usage by Octave.

On 64-bit Windows 7, with a 64bit (Fortran) indexing Octave-5.0.0, after
reading the array from file, the whos command says:

>> whos
Variables in the current scope:
   Attr Name          Size                     Bytes  Class
   ==== ====          ====                     =====  =====
        aa     10000000x10                 649999985  cell
        ans           1x1                          8  double
Total is 100000001 elements using 649999993 bytes

While reading the data, Octave's actual RAM usage went from a mere 185 MB to
over 5.8 GB, i.e., almost *nine* times the amount of bytes suggested by
whos. Such a multiplier is unexpectedly high for me; I wouldn't have been
surprised with a factor 2 or 3 or so.

With 64-bit Octave-4.4.1 (no 64b Fortran indexing), whos tells me the same
numbers but Octave's RAM usage is even a little larger, around 6 GB. Trying
on Linux (Mageia 6) memory consumption by Octave even goes to 6.2 GB.

Q:
What is the reason that actual RAM usage is so much larger than suggested by
"whos"? Where does the overhead come from?

A corrollary is that esp. for unwary users, "whos" actually gives deceiving
results.

Thanks,

Philip

[*] code to create it is in bug #53899, "make_big_aa.m",
https://savannah.gnu.org/bugs/download.php?file_id=45317




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]