>Memory is to hard to measure

>Inspired from the comment “It saves zero memory” from here
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/501241

I’ve been trying to keep my eye on Ubuntu’s memory usage for some time now, but there has never been a great way to measure memory usage.  Here is an alternate memory tracking idea.. Don’t bother trying to observe it directly.  These are the steps I followed to prove that removing tty2-tty6 will save us more than zero memory. 

  1. Figure out how much your computer (when booting off of a liveUSB in my case) needs to boot, open a terminal, and run free -m with using almost no swap.

    [make sure the computer has a swap partition, or else this won’t work]

    Do this by booting the kernel with different mem=???M options.  And try getting swap close to zero (see it with free -m), but still in positive territory by a few.  Mine was mem=450M, and swap used was 3 M

  2. Then make your changes, in my case rm /etc/init/tty[2-6]
  3. Reboot with the same kernel option (mem=450M), run the terminal, run free -m and rejoice in the lack of swap used.

Why does this prove my point?
It gets around the memory measuring difficulties and says, “If we don’t do X, will the system decide it doesn’t need to activate swap?”

6 thoughts on “>Memory is to hard to measure”

  1. >well, you must consider one important fact: even when you have plenty of free memory, and when you have some swap activated, it WILL be used. Swap is not used only when there's not enough free memory; when some pages of some processes are not accessed from some time, it will be swapped out.

  2. >@ethan: it should read MiB, sorry.
    @blindvic: I'd agree with you, if it weren't when using an install media or using a livecd media.

  3. >Amusingly I had a bit of a switch around with my hard drives in one of my Ubuntu servers recently. Running various streaming an tools, deluge and Gnome desktop, i went back to it few days later an realised swap hadn't been activate for several days! 🙂 Its 2ghz AMD with 1500MB ram.

Leave a Reply

Your email address will not be published. Required fields are marked *