I'm working with a team on a single page application with quite a few timers, and about 10 REST API calls per second. We've used the Chrome memory profiling tools to locate all of our memory leaks--at this point the heap size stays about the same (i.e. in between garbage collections). However, we're noticing that the longer the application runs, the more memory the Chrome tab itself uses. After a few hours, we've seen the tab memory grow to about 350MB, while the heap size remains at 6MB. If run overnight, the tab consumes over 500MB and becomes unusable by morning.
We need the application to run for long periods of time (we're hoping to restart it only once a week), so this is a problem.
Here's a screenshot of the heap timeline over the course of an hour. At the end, the tab's private memory size is 350MB, while the heap's size remained at around 5.4MB.
We've seen this in Chrome 40 and Chrome 38, on Windows 7. We have caching disabled, and are running the application in incognito mode.
Any idea why the tab memory size would grow to the point where Chrome is unusable, while the JS heap usage remains so small?
EDIT: We ran the app for a couple days and the tab memory size is up to 800MB, heap size still about the same.
EDIT (6/9/15): I'm not sure if this is documented anywhere, but it seems like Chrome changes the amount of memory it will allocate to a tab, based on the amount of free memory on the system. So, if you have a lot of free memory, tabs will use a lot of memory, and if you don't have much, it won't use as much. This doesn't seem to be proportional to heap size, it's probably just stuff that Chrome keeps around to make itself faster. This is only a theory, based on monitoring Chrome memory usage :)