Servoy performance and/or resources issues

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Servoy performance and/or resources issues

Postby derk.hulshof » Thu Jun 26, 2014 2:51 pm

Hi all,
I am running a servoy server on a windows machine
Technical data:
Servoy version 7.3.1 release 2022
Java 1.7.0_051
Windows version 2008 R2 64 bit 4GB RAM

I installed Servoy 7.3.1 about 6 weeks ago. The heap memory etc 1280MB (service wrapper and server_server.bat)
After 6 weeks the memory used was between 1050 and 1200 MB. This caused some weird problems.
Normally it should be around 450 MB. It looks like or Java or Servoy is not releasing its memory.
Now I restarted the windows server and it runs normally again (around 450 MB memory usage).

I can assign more memory to Servoy, but then it will only take some more weeks while it reaches the max.
Is this an issue in Servoy or java and how to solve this?

Tnx
Derk
derk.hulshof
 
Posts: 108
Joined: Tue Dec 03, 2013 9:18 am
Location: Netherlands

Re: Servoy performance and/or resources issues

Postby Andrei Costescu » Fri Jul 04, 2014 1:19 pm

If it's not due to a fluctuation in connected clients then the best thing would be to create a case.
A heap dump or connection to the server when it's using more memory then it's supposed to will probably be needed to diagnose this.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Servoy performance and/or resources issues

Postby sovanm » Fri Jul 04, 2014 3:24 pm

Hi,

I am getting similar complains from my clients.
We have a server hosted in amazon ec2 instance. As per documentation, for web client on an average per client it should use 20MB of space. But in our case it is consuming 3.45GB of system physical memory only for 26 clients connected.

What are the possible scenario where a client consumes more physical memories space. I am just curious to know which might help me to see where are the problems.

ec2 instance has only servoy server and postgres(separate instance not the bundled one with servoy) installed and running as service. This application is basically for uploading files to amazon buckets from clients machine.

Thanks
sovanm
 
Posts: 99
Joined: Fri Oct 28, 2011 1:55 pm
Location: Bhubaneswar, India

Re: Servoy performance and/or resources issues

Postby Andrei Costescu » Fri Jul 04, 2014 3:30 pm

Well, if the solution reserves lots of space in memory it will use memory, yes.
For example if on solution open you allocate an array of 1 GB that one lives in memory.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Servoy performance and/or resources issues

Postby sovanm » Wed Jul 09, 2014 12:55 pm

Hello,

I have done some testing with my test server on the above issue. Here is the scenario..
Server : 7.4.1
Java 7
Server server start as service.

- Initially when I start/restart the server, in task_manager -> processes it shows Java is consuming memory between 161MB - 180MB without any client connected { Only a batch process is running(Stopped the batch process but this value remain same).}
- When I logged in as an user from web-client, the memory increases by 20MB(as expected for middle sized solution). This repeats for every client connected.
- On Logout/Closing the browser do not release the memory used by that client. I know the session is still active. But this value remains the same even after I shut the client from admin page.

Is this normal when we use servoy as a web-client? When it should release the memory after shut down of the client ? Please advice if any thing seems wrong in the above process.


Thanks
Sovan
sovanm
 
Posts: 99
Joined: Fri Oct 28, 2011 1:55 pm
Location: Bhubaneswar, India

Re: Servoy performance and/or resources issues

Postby Andrei Costescu » Wed Jul 09, 2014 1:26 pm

The resources should be freed when client is shut down (so no longer listed in admin page - clients section).
But what you said might be normal if you used task manager or other OS tools.

The JVM does it's own handling of heap space, and if you allocated some memory for one client it might not free it right away back to the OS, it might keep that available on heap although it's not allocated (allocated speaking from Java point of view). It also depends on when the garbage collector runs and at which level. (so it might stay a while even on the used java heap until GC runs)

To check this sort of thing you can use tools in the JDK (for example an visual tool would be jvisualvm.exe from [jdk_install_dir]/bin). It can show you the heap and after you close that client, then you can request garbage collection then check the allocated heap again. Using task manager is not that accurate as it doesn't take into account garbage collection and internals of how JVM allocates memory from the OS.

If there is a memory leak somewhere either in the solution/used plugins or in Servoy itself, the allocated heap as seen by those tools should keep growing (usually slowly) as clients come and go. If this happens a heap dump is needed to diagnose the problem.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 8 guests

cron