summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/render_process_host.cc
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-19 18:47:41 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-19 18:47:41 +0000
commit06768c2f67ae0353981851c6f6af29df85747b75 (patch)
tree3edc51f88c03fe463d5d49d7ba75d2e9d1b956e8 /chrome/browser/renderer_host/render_process_host.cc
parent2e39d2ebf7e388595bd7fe17d99e30e8a35a43fc (diff)
downloadchromium_src-06768c2f67ae0353981851c6f6af29df85747b75.zip
chromium_src-06768c2f67ae0353981851c6f6af29df85747b75.tar.gz
chromium_src-06768c2f67ae0353981851c6f6af29df85747b75.tar.bz2
Update the table of RAM vs number of renderers
- revised my guesstimate of 25 MB per renderer to 40MB, which I think is more appropiate for long lived tabs, since short lived tabs don't really matter here. - the lower end (< 1GB) has less total renderers - the middle has about the same - the upper end (> 2GB) has more renderers - added test to open 34 tabs. Review URL: http://codereview.chromium.org/21484 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10024 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_process_host.cc')
-rw-r--r--chrome/browser/renderer_host/render_process_host.cc25
1 files changed, 20 insertions, 5 deletions
diff --git a/chrome/browser/renderer_host/render_process_host.cc b/chrome/browser/renderer_host/render_process_host.cc
index 7a9ede0..ad44ac8 100644
--- a/chrome/browser/renderer_host/render_process_host.cc
+++ b/chrome/browser/renderer_host/render_process_host.cc
@@ -16,12 +16,27 @@ unsigned int GetMaxRendererProcessCount() {
// amount of installed memory as reported by the OS. The table
// values are calculated by assuming that you want the renderers to
// use half of the installed ram and assuming that each tab uses
- // ~25MB.
+ // ~40MB, however the curve is not linear but piecewise linear with
+ // interleaved slopes of 3 and 2.
+ // If you modify this table you need to adjust browser\browser_uitest.cc
+ // to match the expected number of processes.
+
static const int kMaxRenderersByRamTier[] = {
- 4, // less than 256MB
- 8, // 256MB
- 12, // 512MB
- 16, // 768MB
+ 3, // less than 256MB
+ 6, // 256MB
+ 9, // 512MB
+ 12, // 768MB
+ 14, // 1024MB
+ 18, // 1280MB
+ 20, // 1536MB
+ 22, // 1792MB
+ 24, // 2048MB
+ 26, // 2304MB
+ 29, // 2560MB
+ 32, // 2816MB
+ 35, // 3072MB
+ 38, // 3328MB
+ 40 // 3584MB
};
static unsigned int max_count = 0;