Explorar el Código

shrunk bootstrap memory usage

Feng hace 10 años
padre
commit
2d7f2383d1
Se han modificado 2 ficheros con 8 adiciones y 9 borrados
  1. 4 4
      rel/files/emqttd.config
  2. 4 5
      rel/files/vm.args

+ 4 - 4
rel/files/emqttd.config

@@ -176,12 +176,12 @@
             %% Size of acceptor pool
             {acceptors, 16},
             %% Maximum number of concurrent clients
-            {max_clients, 1024},
+            {max_clients, 512},
             %% Socket Access Control
             {access, [{allow, all}]},
             %% Socket Options
             {sockopts, [
-                {backlog, 1024}
+                {backlog, 512}
                 %Set buffer if hight thoughtput
                 %{recbuf, 4096},
                 %{sndbuf, 4096}
@@ -192,7 +192,7 @@
             %% Size of acceptor pool
             {acceptors, 4},
             %% Maximum number of concurrent clients
-            {max_clients, 1024},
+            {max_clients, 512},
             %% Socket Access Control
             {access, [{allow, all}]},
             %% SSL certificate and key files
@@ -226,7 +226,7 @@
             %% Size of acceptor pool
             {acceptors, 4},
             %% Maximum number of concurrent clients
-            {max_clients, 512},
+            {max_clients, 64},
             %% Socket Access Control
             {access, [{allow, all}]},
             %% Socket Options

+ 4 - 5
rel/files/vm.args

@@ -22,10 +22,10 @@
 
 ## Enable kernel poll and a few async threads
 +K true
-+A 32
++A 16
 
 ## max process numbers
-+P 1000000
++P 8192
 
 ##-------------------------------------------------------------------------
 ## Env
@@ -36,8 +36,7 @@
 
 -env ERTS_MAX_PORTS 4096
 
-#-env ERL_MAX_ETS_TABLES 1024
+-env ERL_MAX_ETS_TABLES 1024
 
 ## Tweak GC to run more often
-##-env ERL_FULLSWEEP_AFTER 1000
-#
+-env ERL_FULLSWEEP_AFTER 1000