]> git.ipfire.org Git - people/shoehn/ipfire.org.git/commitdiff
Start less CPU processes.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 4 May 2013 17:25:03 +0000 (18:25 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 4 May 2013 17:25:03 +0000 (18:25 +0100)
webapp/__init__.py

index 942270928f2f9393ba5d98088bfcd4888371f744..f0e7c0bd70dd74cf9e4ff04844847904f87e7ac6 100644 (file)
@@ -250,11 +250,13 @@ class Application(tornado.web.Application):
 
                http_server = tornado.httpserver.HTTPServer(self, xheaders=True)
 
 
                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)
                # 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)
                
                else:
                        http_server.listen(port)