0
$\begingroup$

I was surprised to learn how much of my session memory consumption is due to baseline claims by the Kernel and FrontEnd. Using 12.1.0.0 on Win10/64/Pro. Here's an example:

    MemoryInUse[] 
    (* Out[102]= 250025544*)

i.e. 250MB for the Kernel. Further investigation per suggestion of Alexey Popkov Profiling memory usage in Mathematica revealed (excerpt):

Total: 158686161 bytes for 66548 symbols

That's about 60MB just for QuantityUnits stuff, ~160MB total for similar System and Paclet stuff.

Onto the FrontEnd, I get ~850MB (below), ~consistent with Windows Task Manager which reports 925MB:

MemoryInUse[$FrontEnd]
(* Out[112]= 857432064 *)

Further investigation per suggestion of Brett Champion to examine Notebook History identify-which-cell-uses-most-memory-in-front-end revealed all my cells using 5MB.

So wow, I thought the memory consumption was mostly "my bad", but it's mostly baseline consumption. I realize Mathematica requires much more memory than for my end-user elements, but was surprised it was this much. Are there any levers to clamp down on this baseline consumption?

$\endgroup$
3
  • 3
    $\begingroup$ That's nothing. E.g. my WhatsApp client and itunes each reserve as much memory. And they are definitely not nearly as versatile as the Mathematica kernel... ;) $\endgroup$ Dec 21, 2020 at 17:51
  • 1
    $\begingroup$ Why do you want to “clamp down” on memory consumption? What did you buy your memory for, if not to use it? Is the memory consumption in any way impacting other programs? $\endgroup$
    – MarcoB
    Dec 22, 2020 at 3:36
  • $\begingroup$ Guys, yes, you are right. I suppose the value of this post perhaps is remind users that, before going off looking into one's code or session as cause for memory consumption, be aware of the baseline consumption. (Yes, this is obvious, but evidently was not to me in the heat of the moment). $\endgroup$
    – frankeye
    Dec 24, 2020 at 17:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.