Huge memory consume

Hi!
I have finished my first Vaadin Project but I am seeing is so slow , my server is Debian 7 with Tomcat 7.1. Somebody knows any tips or cluees to get better performance. My server has a 1gb Ram this is a test server.
Can anybody addreess me in rigth direction about this issue

Hi,

It is pretty much impossible to give any detailed hints without seeing your applications code. To see what exactly is using the memory, you should definitely start by some heap dump analyzer.

Most probably you are loading something a LOT to your ui components. If you e.g. load a full list of your JPA entities into an in memory container like BeanItemContainer, this means practically all of that, and some overhead, is retained in your apps memory. In case this exact issue happens to be the issue, you could also try using ListContainer from Maddon. It uses one tenth of the memory and is way faster than the core frameworks counterpart.

But, as stated in the beginning, don’t guess what is wrong, find out what is wrong. Then consider what to do.

cheers,
matti

OK, can you tell me about any head dump analyzer.? I am newbie in this , I am coming from PHP/APache, and never saw this problems. I am using Vaadin+Grails to do my app.
What app can I use to analyze the memory consume ?

TIA

I’m curious…have you tried using SQLContainer with your Grails app? I’m struggling to do so (see https://vaadin.com/forum#!/thread/7862584) and I’d be very interested to know if you succeeded doing so. I would like to use the SQLContainer specifically to avoid what I believe will be large memory consumption because in-memory nature of the BeanItemContainer.

Hi,

VisualVM is free and comes with the JDK. You can use that to analyze memory heap, calculate retained sizes and see the objects that really eats your memory.

I never use SQLContainer, not really my favourite piece of software. When working DB I favor ORM libraries, they make my code much easier to understand.

cheers,
matti

matti,

I’m using ORM as well. However, what do you use for a high performing container for your vaadin apps? JPAContainer? Unfortunately, my app is using grails, which doesn’t use JPA (Hibernate instead)

I use IndexContainer I never have used SQLContainer. I download MemoryAnalizer from Eclipse site to check the memory use.

TIA