Hacker News new | past | comments | ask | show | jobs | submit login

Not everyone has a system with over 8 or 16 gigabytes of RAM to run such apps.



So, let's talk with real numbers here.

I happen to have a Markdown file open in MacDown, a native application, right now. According to Activity Monitor, it's using 67.1 MB of RAM. I also downloaded Mark Text to take a look at it. So now I've got the same Markdown file open in that app, too. It's using 73.9 MB of RAM.

I will admit, that difference in memory consumption is equivalent to seven instances of vim, and I'll keep that in mind the next time I'm trying to get things done on a Raspberry Pi Zero. (As one does.)

But, on this 6-year-old computer, which does not have "over 8 or 16 GB of RAM", I'm still not sweating that 6.8 megabytes.


That is difficult to believe. I unpacked Linux version of the app, Electron binary is 120 Mb, resources.pak is 8 Mb, ICU library is 10 Mb. How can a whole Electron app take just 74 Mb? The numbers don't add up.

To test it myself, I started the program (with --no-sandbox because it requires root privileges otherwise) and measured memory usage using smem:

    $ sudo smem --userfilter=nobody -k --totals

    PID User     Command                         Swap      USS      PSS      RSS 
    23365 nobody   /tmp/.mount_markteqQvqZF/ma        0     6.3M    14.2M    37.7M 
    23388 nobody   /tmp/.mount_markteqQvqZF/ma        0    46.6M    59.4M    90.9M 
    23363 nobody   ./marktext --no-sandbox            0    53.3M    76.3M   118.4M 
    23392 nobody   /tmp/.mount_markteqQvqZF/ma        0   121.1M   142.3M   183.0M 
PSS (Potential Set Size) [1] numbers are additive unlike RSS, so we can sum them and get around 291 Mb of RAM. This counts pages, that are shared between several processes, only once.

Either MacOS uses RAM several times more effective than Linux, or Activity Monitor is showing incorrect numbers to make impression that Mac apps take less memory than apps on competing operating systems.

[1] https://en.wikipedia.org/wiki/Proportional_set_size




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: