Change font size
It is currently Wed May 22, 2013 5:25 pm

Forum rules


Image
. please keep questions related to an OpenSimulator and OSgrid nature.



Post a new topicPost a reply Page 1 of 1   [ 5 posts ]
Author Message
 Post subject: Simulator Memory Usage Keeps Increasing?
PostPosted: Mon May 28, 2012 4:35 pm 

Joined: Fri Mar 16, 2012 12:25 am
Posts: 36
Hello,

When I reset my simulator using monit, the memory usage is 107MB with the server hanging around 490MB.

Even if I don't do anything with the sim, when I check back the memory usage keeps expanding.

Recently I had an uptime of around 16 days and when I checked with monit, the simulator was using around 400MB and the server was at almost 800MB...

Are there some memory leaks in opensim?


Top
 Profile  
 
 Post subject: Re: Simulator Memory Usage Keeps Increasing?
PostPosted: Mon May 28, 2012 7:16 pm 
Fred Leftwich wrote:

Are there some memory leaks in opensim?

Yes. I've been told it's a good idea to restart opensim at least once a week for that reason.


Top
  
 
 Post subject: Re: Simulator Memory Usage Keeps Increasing?
PostPosted: Mon May 28, 2012 10:41 pm 

Joined: Fri Mar 16, 2012 12:25 am
Posts: 36
I thought monit was going to help here. I see in the documentation http://mmonit.com/monit/documentation/m ... me_testing

Quote:
Example of restarting the process if the uptime exceeded 3 days:

check process myapp with pidfile /var/run/myapp.pid
start program = "/etc/init.d/myapp start"
stop program = "/etc/init.d/myapp stop"
if uptime > 3 days then restart

This would be perfect but it was only just added in monit 5.4...my server only has 5.2 available..ugh

Maybe I can compile the 5.4 source on it?


Top
 Profile  
 
 Post subject: Re: Simulator Memory Usage Keeps Increasing?
PostPosted: Mon May 28, 2012 10:59 pm 
I don't use monit, so I've no idea; I'm sure someone else knows,tho.


Top
  
 
 Post subject: Re: Simulator Memory Usage Keeps Increasing?
PostPosted: Mon May 28, 2012 11:22 pm 

Joined: Fri Mar 16, 2012 12:25 am
Posts: 36
Yea the source compiles fine on Ubuntu 11.04 x86_64.

Downloaded and extracted the 5.4 source:
Code:
user1@server1 ~: wget http://mmonit.com/monit/dist/monit-5.4.tar.gz
user1@server1 ~: tar xvzf monit-5.4.tar.gz

Had to install the ssl and pam headers:
Code:
user1@server1 ~: sudo apt-get install libssl-dev libpam-dev

Move into the monit directory to configure and compile:
Code:
user1@server1 ~: cd monit-5.4
user1@server1 ~/monit-5.4: ./configure
user1@server1 ~/monit-5.4: make

This makes the new version 5.4 'monit' executable. The old monit 5.2.1 version was in /usr/sbin so I just moved it to make way for the new one:
(remember to stop the monit process)
Code:
user1@server1 ~/monit-5.4: sudo service monit stop
user1@server1 ~/monit-5.4: sudo mv /usr/sbin/monit /usr/sbin/monit-5.2.1
user1@server1 ~/monit-5.4: sudo cp monit /usr/sbin

Well this new monit wants the 'monitrc' file in /etc instead of /etc/monit so I linked the file:
Code:
user1@server1 ~/monit-5.4: cd /etc
user1@server1 /etc: sudo ln -s monit/monitrc monitrc

Now I could add the line into my opensim.conf file for the new uptime check:
(wherever your individual opensim.conf is)
Code:
user1@server1 /etc: vi ~/opensim/monit/conf/opensim.conf

and added the following line in the check process section:
Code:
if uptime > 7 days then restart

saved, exit and restart monit:
Code:
user1@server1 /etc: sudo service monit start

Now I am running version 5.4 and monit should restart my simulator every 7 days. Very cool monit ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 5 posts ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net