r3dux.org

A number-pimping side project from the valleys in *NEW* upside-down flavour.

  • Home
  • ABOUT
  • OLD SITE
  • SEARCH
  • FEEDBACK

How to: Get detailed browser memory usage from within Firefox or Chrome

r3dux | August 23, 2011

Well, you could use the top command, or maybe some ps grepping like this:

$ ps -ely | grep -E 'firefox|chromium|plugin'
S  1000  5214  5576  2  80   0 77916 232548 futex_ ?       00:01:00 chromium-browse
S  1000  5572  1984  1  80   0 85916 184994 poll_s ?       00:03:27 chromium-browse
S  1000  5574  5572  0  80   0 19276 60531 poll_s ?        00:00:02 chromium-browse
S  1000  5576     1  0  80   0 22476 67221 wait_f ?        00:00:00 chromium-browse
S  1000 31011  1984  3  80   0 415124 284530 poll_s ?      00:05:14 firefox-bin
R  1000 31211 31011 58  80   0 618876 349396 -    ?        01:31:23 plugin-containe
S  1000 32178  5572 13  80   0 62780 171077 poll_s ?       00:08:28 chromium-browse

But that’s not especially friendly to read, so how about simply going to the internal memory usage page at about:memory? (Note: Just put about:memory into the URL location and hit enter – I can’t link to it because it goes to about:blank instead!)

Firefox Memory Usage - Internal Display

Presumably this is a cross-platform method, so available on any modern version of Firefox or Chrome. The details in the above screengrab were taken on Firefox 6 on Linux with two windows containing 8 tabs in total open, and it’s chewing on 316MB of RAM? Ouch. When my wife plays Facebook games I’ve seen Firefox eating over 700MB for a single window with a single tab running FarmTown or Treasure Madness or such, but I guess that’s more down to the bloat of those flash games than the browser… Still, good technique.

Credit where it’s due: Tip found on linuxers.org – good find!

Comments
1 Comment »
Categories
How-To
Tags
Bloat, Browser, Firefox, grep, Memory, ps, RAM, Usage
Comments rss Comments rss
Trackback Trackback

How To: Speed Up Linux by Minimising Swapiness

r3dux | June 10, 2010

Swappiness is a setting in the Linux kernel which controls how amenable to paging things in memory out to disk the kernel is (like using virtual memory in Windows), and in Ubuntu it comes with a default value of 60 – which for a box with lots of memory is too high in my humble opinion. The range of values goes from 0 (never use the swap file unless absolutely critical) to 100 (page stuff out to file whenever it feels like).

You can easily check your current swappiness value like this:

cat /proc/sys/vm/swappiness

And you can change the swappiness of the system on the fly (but it’ll go back to the value in the sysctl.conf file after a reboot) like this:

sudo sysctl vm.swappiness=10

My laptop has 4GB of RAM, and even with a bunch free, Linux decides to swap stuff out to file quite often with a swappiness setting of 60, which can slow the box to a crawl. To fix this, and permanently insist that all physical RAM is used up before starting any paging at all,, simply change the setting to something like 10 like this:

gksudo gedit /etc/sysctl.conf

Then, when the file is open, either add the line vm.swappiness=10 to the bottom of the file, or if it already exists just modify the value, then reboot.

To find out more about the whole swappiness thing, try this article.

Comments
1 Comment »
Categories
How-To, Linux
Tags
Memory, Paging, RAM, Swap, Swappiness, Virtual
Comments rss Comments rss
Trackback Trackback

Translate

Categories

Archives

Tags

3D ActionScript ActionScript 3.0 Adobe AI Ballarat Bash C++ Class Convert CS4 Effect Error Film Flash GLSL Gnome Hack How-To install Jaunty Java Kinect Linkage Linux Mash-Up Microsoft Motion OpenGL Particle Problem PS3 Remix Retro script Slides Sound Systems Texture Ubuntu Video VirtualBox Wii Windows XBox

Gamercard

OpenR3dux

Misc.

Flattr this

RSS Feed

r3dux twitter feed



“I like you so much I talk to everyone but you...”

 - Ani DiFraco

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox