Memory usage with a large db?

16 views
Skip to first unread message

Göran Svensson

unread,
Mar 27, 2014, 7:11:19 AM3/27/14
to getx...@googlegroups.com
Hi,

I have set up two sites, both has the default configuration with mySQL, ORM etc. One has 12 records (articles) the other has 14 000 articles. When I start the one with 12 records I can use a standard Tomcat config with heap space and perm gen (64 Mb and 128 Mb as I remember), but when I start the one with 14 000 records I immediately get a out of heap space error and has to config at least 2 Gb Xmx. 

Is everything in the db loaded in to the RAM at start up? 

Is this a ORM feature?

Is there some good way to decrease the memory footprint to avoid high hosting cost? Lazy loading or something...

 

Göran Svensson

unread,
Mar 27, 2014, 8:21:07 AM3/27/14
to getx...@googlegroups.com
Solved!

I had done some customization in the controller and loaded way to much in to the rc scoope. I had to count number of articles because I use masonry and infinite scrolling with jQuery. I solved it by adding conditionals. Now I can set Xmx to 512m and i still have 85% heap space left!
Reply all
Reply to author
Forward
0 new messages