-1

The screenshot below shows the change in cache related state of my zope instance over time (3 months so far).

We've increased the cache size several times over the period from 3000 all the way up to 6000000. With the exception of one recent blip, we have hit a ceiling of 30 Million (not sure what parameter that is) (see the 'by year' graph). This happened at a cache size of about 1000000, after which, changes to the cache size seemed to have no effect on the cached objects or memory usage of zope.

The zope/plone process moved from using about 500 MB of memory to using 3GB (we have 8GB on this server).

What I expected was that sliding the cache size upwards would allow zope to take advantage of more of the available server memory, but it is stuck at 3GB (out of a potential 8GB on the server).

Is there another setting that might be "capping" things at 3GB?

zope object cache statistics

David Bain
  • 2,439
  • 1
  • 17
  • 19
  • Are you certain your OS doesn't limit per-process memory size? – Martijn Pieters Apr 12 '13 at 15:19
  • That's a brilliant thought... will look into that, especially since the memory usage graph keeps capping at 3GB, pretty much plateaued. – David Bain Apr 12 '13 at 17:36
  • If you have 8GB, why wouldn't you add more zeo clients first instead of trying to make one client take up all the memory. – vangheem Apr 15 '13 at 08:36
  • Also, it's quite possible you simply do not have enough objects on the site to fill the entire 8GB of memory you want to consume. – vangheem Apr 15 '13 at 08:36

3 Answers3

2

At a guess, your OS is limiting per-process memory size.

In a bash shell, check ulimit -v to see if a virtual memory limit is set. See man bash for the full list of options for that command.

See Limit memory usage for a single Linux process for more information on how to use ulimit.

Community
  • 1
  • 1
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • ulimit -v returns 'unlimited'. Based on other research I've found that there is a hard limit on a 32 bit platform though (discussed here: http://www.linuxquestions.org/questions/linux-general-1/32-bit-os-and-4gb-memory-limit-707762/) – David Bain Apr 19 '13 at 12:46
2

I don't know what's going on with the memory of your server but you are doing this the wrong way: you simply can't have 6 million objects on memory, that's impossible: on a typical installation in Plone 4.x you should need somewhere in between 50 GB and 150 GB of memory for that.

to solve this we need more information: which Plone version are you using? how many objects do you have in your database? how many threads? what's the architecture of your server, 32 or 64-bit?

second, be sure to install the latest version of the munin.zope plugin to collect reliable information about your server (hat tip to Leo Rochael).

third, read this thread on the core developers list to understand how to calculate a more realistic number for your cache size (hat tip to Hanno Schlichting).

fourth, move the number up slowly and take time to monitor the results; check for total number of objects in memory and avoid memory swaps at any cost. You can stop increasing cache size if you see the number of objects is below your goal value. remember: you're never gonna have all the objects in memory, that's quite difficult because people tend to visit mostly only a subset of your content.

fifth, if you are in Plone 4.x test DateTime 3.0.3 (on a staging server before put it in production) this could decrease further your memory consumption by up to 40% (somebody told me it now works also in Plone 3.x, but I haven't check it my self).

sixth, share your result on the Plone setup list!

good night and good luck!

hvelarde
  • 2,875
  • 14
  • 34
1

A 32-bit platform -- don't know if this is limited to Intel -- is limited to 3GB per process. That is because it can only address up to 4GB per process, and the bottom 1GB is used by the kernel. Of course PAE allows you to access up to 64GB, but there are certain per process limitations which you are running into here. You really cannot run a high-traffic plone site on a 32-bit platform anymore. Quite often the simplest solution is to upgrade your OS to the 64-bit version, because unless you have seriously ancient hardware, it should already be capable of running x86-64.

izak
  • 981
  • 7
  • 10