diff --git a/setting.py b/setting.py index 824725648..6ab869850 100755 --- a/setting.py +++ b/setting.py @@ -9,8 +9,8 @@ sys.path.append(chdir + '/class/core') sys.path.append("/usr/local/lib/python2.7/site-packages") import public import system_api -# cpu_info = system_api.system_api().getCpuInfo() -# workers = cpu_info[1] + 1 +cpu_info = system_api.system_api().getCpuInfo() +workers = cpu_info[1] if not os.path.exists(os.getcwd() + '/logs'): @@ -25,7 +25,9 @@ if os.path.exists('data/ipv6.pl'): else: bind.append('0.0.0.0:%s' % mw_port) -workers = 2 +if workers > 2: + workers = 2 + threads = 4 backlog = 512 reload = False