Re: [gccgo] How to reduce VmData usage in go executables?

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

 



Florian Weimer <fweimer@xxxxxxxxxx> wrote on 12/11/2018 09:49:01 AM:
> * Aaron Wright:
> 
> > The go executable that allocates 800-900 MiB of RAM is:
> 
> How do you measure memory utilization?

A couple ways. The first is just looking at the output of top (busybox), 
the VSZ column. The second is /proc/<pid>/status, which reports:

VmPeak:   811692 kB
VmSize:   811692 kB
VmLck:         0 kB
VmPin:         0 kB
VmHWM:      5796 kB
VmRSS:      5796 kB
VmData:   807196 kB
VmStk:       132 kB
VmExe:      2936 kB
VmLib:         0 kB
VmPTE:        52 kB
VmPMD:         0 kB
VmSwap:        0 kB

I'm aware that VmData, VmPeak, VmSize, etc are all virtual memory, but I'm 
worried that if the process has that allocated, it could try to use it at 
some point, which would not be good for my device. Perhaps (most likely) 
I'm not understanding these variables completely, but the huge numbers are 
"scary" for other developers and I.

It's my understanding that go executables most likely use some arena 
allocation and manage their own memory, but 800 MiB for a hello world 
executable on a box with only 512 MiB of RAM seems extreme to me.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux