5

I am running a Debian Jessie and having memory issues when using Google Chrome

Screenshot of a htop sorted by memory usage

I tried disabling extensions, disabling cache, flushing the cache, and disabling the web 3d rendering, but nothing really improves.

I am getting huge lags some times and I am really wondering where this is coming from.

2 Answers2

5

I use Chromium, and I'm facing the same issue: Chromium takes a lot of memory, freezing system. The problem is not in memory consumption but in my user-experience: I really don't like when my laptop turns into the brick.

There is an open issue for chromium, and today it is still unresolved: https://bugs.chromium.org/p/chromium/issues/detail?id=393395

my solutions

I am on Linux Mint, so I test several solutions:

  1. ulimit. Doesn't work for me...
  2. cgroup : add browser to the process group and set limits: https://gist.github.com/juanje/9861623
  3. Chrome extensions. Yes, it is not a solution, but could be a good workaround:
1

If you add up MEM% for all the identical looking chrome processes, then you have well over 100%, which is impossible. That's because those are not, in fact, separate processes, they're threads, which share the same memory space. htop shows these by default, but see here for how to change that and get a view that will make more sense to you.

Your total used RAM is 1047 of 1727 MB, so you do not have memory problems. When looking at memory stats, keep in mind that virtual memory, more properly: virtual address space, shown here as VIRT is not real memory. It's address space, and most of the addresses aren't used and don't correspond to anything. On linux, the size of this pretend space can be up to 4 GB per process, even if you don't have that much available to start with.

A decent metric of the amount of RAM actually consumed is the RSS or resident memory size (in htop's case, RES). If you eliminate threads from the view, you'll see there's actually only one 142 MB google-chrome process (actually there may be a handful of genuinely separate chrome processes, but not dozens). Another significant stat if you are trying to diagnose system performance problems is the amount of CPU time consumed (TIME+), but again nothing looks particularly out of line here WRT chrome.

goldilocks
  • 87,661
  • 30
  • 204
  • 262
  • I did know that those were threads but thanks for the tips on how to display it more accordingly. Are you saying that google-chrome is using a decent amount of memory and the issue might come from somewhere else ? –  Jul 01 '14 at 12:50
  • I don't see anything there that implicates chrome, no. What exactly is the issue? Is it just generally slower than you'd like, or is it actually freezing up regularly? – goldilocks Jul 01 '14 at 13:11
  • It's actually freezing up regularly, I do not have those issues on iceweasel for example –  Jul 01 '14 at 13:26
  • Hmmm -- iceweasel doesn't do flash, does it? Might be something like that, a chrome plugin that's hamstrung by content iceweasel doesn't handle. – goldilocks Jul 01 '14 at 13:38
  • Humm. I have Flash (really all plugins) disabled in my Chrome, requiring u to click-to-activate. I only have 2 tabs open, have pkill'd Chrome and restarted... And yet I see Chrome is using 87.2 G of VIRT memory space/address. Yes, that's "G" not "M". If that's just memory addresses, that's a lot of memory addresses... And, it persists between restarts. The two tabs are: wikipedia.org and fedora wiki pages. That's it. I only have 2 or 3 extensions enabled. Nothing crazy. I do have like 5000 bookmarks though. – eduncan911 Jan 31 '16 at 17:23