From cef37a4a5ffcd83d43e48676358d297d59492258 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 4 May 2013 18:25:03 +0100 Subject: [PATCH] Start less CPU processes. --- webapp/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/__init__.py b/webapp/__init__.py index 94227092..f0e7c0bd 100644 --- a/webapp/__init__.py +++ b/webapp/__init__.py @@ -250,11 +250,13 @@ class Application(tornado.web.Application): http_server = tornado.httpserver.HTTPServer(self, xheaders=True) + num_processes = multiprocessing.cpu_count() / 2 + # If we are not running in debug mode, we can actually run multiple # frontends to get best performance out of our service. if not self.settings["debug"]: http_server.bind(port) - http_server.start(num_processes=multiprocessing.cpu_count()) + http_server.start(num_processes=num_processes) else: http_server.listen(port) -- 2.47.3