{"_id":"578044cd6a18cd0e00db010f","parentDoc":null,"user":"55282916d9e1db2d00cd923c","version":{"_id":"552829408962f339009a6790","project":"552829408962f339009a678d","__v":26,"createdAt":"2015-04-10T19:49:20.516Z","releaseDate":"2015-04-10T19:49:20.516Z","categories":["552829418962f339009a6791","55284ed68962f339009a67e1","55286c73391a362500d9b3f4","552918f6b316811900149f59","5529b255d739240d00a3483e","553287590a578a0d008d4ff5","55329385e7d1fa0d003fc946","5550b55200420e0d00d1312f","55525fca953c9c0d00f507d7","559199695631432f002d358a","559d8d96980b801700d5ec7e","55c5e833cccdeb2d004e24b9","55d76504f662951900fc0e7d","55ea213cc62aa02f008229cd","56157b750f5ed00d00483dd8","561981fbac0924170069f4e8","561b8b1ea430930d0037ea67","563417428b86331700b488ca","56cd785bface161300dae0ec","56cdcc6e70db8a15006395f4","56cdf1b749abf10b0036a34a","56cedc8ce50c9c1b00830423","56e97ba8d825061900d1ac83","570d505228e6900e00477229","573614ca2ab52e1700c8e851","57d556a2496a3117004d70cf"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":10,"category":{"_id":"56cedc8ce50c9c1b00830423","__v":1,"pages":["56d763c2693ef41d0003abec"],"project":"552829408962f339009a678d","version":"552829408962f339009a6790","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-25T10:50:52.142Z","from_sync":false,"order":8,"slug":"server-configuration","title":"Server Configuration"},"project":"552829408962f339009a678d","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-09T00:26:53.386Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"Actor Server runs on JVM, which is very stable and performant platform. \nIn default distribution(Ubuntu PPA/deb packaging) of Actor Server JVM parameters are set to reasonable defaults. These defaults will be suitable to run server for small group of people.  However, when dealing with high load in production, you will need to adjust JVM settings. Below is a list of parameters you will probably need to configure.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configuration parameters\"\n}\n[/block]\n### Memory allocation pool\n* `-Xms` specifies the initial size of the memory allocation pool.\n* `-Xmx` specifies the maximum size of the memory allocation pool.\n\nDefault params are `-Xms256M -Xmx1024M`. You can specify bigger amount of memory to be used, for example:\n```\n-Xms1G -Xmx8G\n```\nIn this case initial allocated memory will be 1Gb, and it can rise up to 8Gb.\n\n### Garbage collector\nFor small-medium heap size(less than 4Gb) prefer CMS(Concurrent Mark-Sweep) garbage collector. You can enable it via:\n```\n-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode\n```\n\nFor big heap size(4Gb+) prefer G1 garbage collector. You can enable it via:\n```\n-XX:+UseG1GC\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Application.ini example\"\n}\n[/block]\nDefault Actor Server distribution(Ubuntu PPA/deb package) uses file `/etc/actor/application.ini` to specify JVM parameters. Here is example application.ini:\n\n```\n-J-Xms1G\n-J-Xmx8G\n-J-server\n-J-XX:+UseG1GC\n```","excerpt":"Adjust memory and GC settings according hardware you have.","slug":"memory-settings","type":"basic","title":"Adjust JVM settings"}

Adjust JVM settings

Adjust memory and GC settings according hardware you have.

Actor Server runs on JVM, which is very stable and performant platform. In default distribution(Ubuntu PPA/deb packaging) of Actor Server JVM parameters are set to reasonable defaults. These defaults will be suitable to run server for small group of people. However, when dealing with high load in production, you will need to adjust JVM settings. Below is a list of parameters you will probably need to configure. [block:api-header] { "type": "basic", "title": "Configuration parameters" } [/block] ### Memory allocation pool * `-Xms` specifies the initial size of the memory allocation pool. * `-Xmx` specifies the maximum size of the memory allocation pool. Default params are `-Xms256M -Xmx1024M`. You can specify bigger amount of memory to be used, for example: ``` -Xms1G -Xmx8G ``` In this case initial allocated memory will be 1Gb, and it can rise up to 8Gb. ### Garbage collector For small-medium heap size(less than 4Gb) prefer CMS(Concurrent Mark-Sweep) garbage collector. You can enable it via: ``` -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode ``` For big heap size(4Gb+) prefer G1 garbage collector. You can enable it via: ``` -XX:+UseG1GC ``` [block:api-header] { "type": "basic", "title": "Application.ini example" } [/block] Default Actor Server distribution(Ubuntu PPA/deb package) uses file `/etc/actor/application.ini` to specify JVM parameters. Here is example application.ini: ``` -J-Xms1G -J-Xmx8G -J-server -J-XX:+UseG1GC ```