]> git.ipfire.org Git - ipfire.org.git/commitdiff
Start as many frontends as CPU cores are available.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 7 Feb 2013 13:18:16 +0000 (13:18 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 7 Feb 2013 13:18:16 +0000 (13:18 +0000)
webapp/__init__.py

index a2477a39d6f0465f02ae8d1632441a002d7e40d9..942270928f2f9393ba5d98088bfcd4888371f744 100644 (file)
@@ -1,6 +1,7 @@
 #/usr/bin/python
 
 import logging
+import multiprocessing
 import os.path
 import simplejson
 import tornado.httpserver
@@ -253,7 +254,7 @@ class Application(tornado.web.Application):
                # frontends to get best performance out of our service.
                if not self.settings["debug"]:
                        http_server.bind(port)
-                       http_server.start(num_processes=4)
+                       http_server.start(num_processes=multiprocessing.cpu_count())
                else:
                        http_server.listen(port)