Setting server memory

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

JohnnyD
Posts: 128
Joined: 29 Oct 2007, 22:13

Setting server memory

Postby JohnnyD » 28 Oct 2012, 16:35

From a tutorial I saw this:

Code: Select all

# Java Additional Parameters
wrapper.java.additional.3=-Xms64M
wrapper.java.additional.4=-Xmx256M


In another forum post I saw:

Code: Select all

wrapper.java.initmemory=256
wrapper.java.maxmemory=512


Is there a preferred/proper way to control the JVM memory or are both equally valid?

And what is the recommended minimum to use? We're not specifying anything on a new install and SFS reports ~90Mb RAM at startup; it keeps going down 1-2 times a day and low memory seems the most obvious reason.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Setting server memory

Postby rjgtav » 28 Oct 2012, 23:20

Hi,

You can check this chapter of the docs, which explains multiple ways of configuring the JVM heap size, depending on which mode you're running the server (as a service or standalone).
And does the server fire any exception when it goes down?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
JohnnyD
Posts: 128
Joined: 29 Oct 2007, 22:13

Re: Setting server memory

Postby JohnnyD » 08 Nov 2012, 20:52

Thanks for the link but it doesn't appear to explain the differences/comparison between the two examples I posted. I am guessing initmemory and maxmemory map to Xms and Xmx respectively but is that a fact?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Setting server memory

Postby rjgtav » 08 Nov 2012, 23:31

Hi,

After searching for a while, it seems that the initMemory setting is the same as the Xms. The difference is that the Xms is a parameter from the JVM, while the initMemory is from the wrapper. When you set the initMemory on the wrapper, it will launch the JVM with the Xms setting set to the value specified on the initMemory.
You can set the wrapper.debug=true command in order to confirm what command is the wrapper sending to the JVM.

Source: http://old.nabble.com/Re%3A-Wrapping-JB ... 42268.html
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
JohnnyD
Posts: 128
Joined: 29 Oct 2007, 22:13

Re: Setting server memory

Postby JohnnyD » 12 Nov 2012, 16:52

Thanks!
nitish5221
Posts: 6
Joined: 10 Apr 2020, 11:30

Re: Setting server memory

Postby nitish5221 » 28 May 2020, 09:25

Hello Sir

I want to increase my default memory usages to -Xms450M -Xmx900M in Jvm option but failed to set this value in server .when i add this value and rebbot the server my server crases (failed to restart ). here is my server configuration detail 2GB ram centos operating system with 60 Gb storage hosted on aws .

I have follwed this link to set change in JVM Option http://docs2x.smartfoxserver.com/Gettin ... nfigurator
User avatar
Lapo
Site Admin
Posts: 21952
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Setting server memory

Postby Lapo » 28 May 2020, 10:39

nitish5221 wrote:Hello Sir

I want to increase my default memory usages to -Xms450M -Xmx900M in Jvm option but failed to set this value in server .when i add this value and rebbot the server my server crases (failed to restart ). here is my server configuration detail 2GB ram centos operating system with 60 Gb storage hosted on aws .

I have follwed this link to set change in JVM Option http://docs2x.smartfoxserver.com/Gettin ... nfigurator

We already replied to your email.
Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
theladycroft
Posts: 4
Joined: 31 Jan 2020, 11:35
Location: Washington DC, US

Re: Setting server memory

Postby theladycroft » 22 Jul 2020, 13:48

rjgtav wrote:Hi,

After searching for a while, it seems that the initMemory setting is the same as the Xms. The difference is that the Xms is a parameter from the JVM, while the initMemory is from the wrapper. When you set the coursework examples initMemory on the wrapper, it will launch the JVM with the Xms setting set to the value specified on the initMemory.
You can set the wrapper.debug=true command in order to confirm what command is the wrapper sending to the JVM.

Source: http://old.nabble.com/Re%3A-Wrapping-JB ... 42268.html


I set using this the wrapper.debug=true command and it helps thanks!

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 32 guests