From 78797395008d771f93b656158b9106ffaf02345b Mon Sep 17 00:00:00 2001 From: benoitc Date: Sat, 20 Feb 2010 15:26:51 +0100 Subject: [PATCH] typo --- doc/htdocs/configuration.html | 60 +++++++++++++++++++ doc/htdocs/faq.html | 2 +- doc/htdocs/index.html | 2 +- doc/htdocs/installation.html | 2 +- doc/htdocs/tunning.html | 94 ++++++++++++++++++++++++++++++ doc/htdocs/usage.html | 2 +- doc/site/configuration.rst | 3 + doc/site/{tune.rst => tunning.rst} | 10 ++++ doc/templates/doc.html | 2 +- doc/templates/index.html | 2 +- gunicorn/arbiter.py | 2 +- 11 files changed, 174 insertions(+), 7 deletions(-) create mode 100644 doc/htdocs/configuration.html create mode 100644 doc/htdocs/tunning.html create mode 100644 doc/site/configuration.rst rename doc/site/{tune.rst => tunning.rst} (76%) diff --git a/doc/htdocs/configuration.html b/doc/htdocs/configuration.html new file mode 100644 index 00000000..744b8049 --- /dev/null +++ b/doc/htdocs/configuration.html @@ -0,0 +1,60 @@ + + + + + Green Unicorn - + + + + + + + +
+ + + + + +
+

Coming soon.

+
+ + + + + + +
+ + \ No newline at end of file diff --git a/doc/htdocs/faq.html b/doc/htdocs/faq.html index 1572eaef..744b8049 100644 --- a/doc/htdocs/faq.html +++ b/doc/htdocs/faq.html @@ -39,7 +39,7 @@
  • Installation
  • Usage
  • Configuration
  • -
  • Tune
  • +
  • Tunning
  • FAQ
  • diff --git a/doc/htdocs/index.html b/doc/htdocs/index.html index 46c5e59e..cf083cc4 100644 --- a/doc/htdocs/index.html +++ b/doc/htdocs/index.html @@ -59,7 +59,7 @@ stream-based protocols over HTTP.
  • Installation
  • Usage
  • Configuration
  • -
  • Tune
  • +
  • Tunning
  • FAQ
  • diff --git a/doc/htdocs/installation.html b/doc/htdocs/installation.html index 20229ab2..73ed8aa2 100644 --- a/doc/htdocs/installation.html +++ b/doc/htdocs/installation.html @@ -39,7 +39,7 @@
  • Installation
  • Usage
  • Configuration
  • -
  • Tune
  • +
  • Tunning
  • FAQ
  • diff --git a/doc/htdocs/tunning.html b/doc/htdocs/tunning.html new file mode 100644 index 00000000..bf3acb82 --- /dev/null +++ b/doc/htdocs/tunning.html @@ -0,0 +1,94 @@ + + + + + Green Unicorn - + + + + + + + +
    + + + + + +
    +

    Gunicorn performances are good enough for most cases. Most often performances can be improved in your application.

    +
    +

    Unicorn configguration

    +

    See Configuration for more informations.

    +
      +
    • worker_processes should be scaled to the number of processes your backend system(s) can support. DO NOT scale it to the number of external network clients your application expects to be serving. Gunicorn is NOT for serving slow clients, that is the job of nginx.
    • +
    +
    +
    +

    Kernel Parameters

    +

    There are various kernel parameters that you might want to tune in order to deal with a large number of simultaneous connections. Generally these should only affect sites with a large number of concurrent requests and apply to any sort of network server you may be running. They're listed here for ease of reference.

    +

    The commands listed are tested under Mac OS X 10.6. Your flavor of Unix may use slightly different flags. Always reference the appropriate man pages if uncertain.

    +
    +

    Increasing the File Descriptor Limit

    +

    One of the first settings that usually needs to be bumped is the maximum number of open file descriptors for a given process. For the confused out there, remember that Unices treat sockets as files.

    +
    +$ sudo ulimit -n 1024
    +
    +
    +
    +

    Increasing the Listen Queue Size

    +

    Listening sockets have an associated queue of incoming connections that are waiting to be accepted. If you happen to have a stampede of clients that fill up this queue new connections will eventually start getting dropped.

    +
    +$ sudo sysctl -w kern.ipc.somaxconn="1024"
    +
    +
    +
    +

    Widening the Ephemeral Port Range

    +

    After a socket is closed it eventually enters the TIME_WAIT state. This can become an issue after a prolonged burst of client activity. Eventually the ephemeral port range is used up which can cause new connections to stall while they wait for a valid port.

    +

    This setting is generally only required on machines that are being used to test a network server.

    +
    +$ sudo sysctl -w net.inet.ip.portrange.first="8048"
    +
    +
    +
    +
    + + + + + + +
    + + \ No newline at end of file diff --git a/doc/htdocs/usage.html b/doc/htdocs/usage.html index 4bdc5757..4198730e 100644 --- a/doc/htdocs/usage.html +++ b/doc/htdocs/usage.html @@ -39,7 +39,7 @@
  • Installation
  • Usage
  • Configuration
  • -
  • Tune
  • +
  • Tunning
  • FAQ
  • diff --git a/doc/site/configuration.rst b/doc/site/configuration.rst new file mode 100644 index 00000000..2890e47f --- /dev/null +++ b/doc/site/configuration.rst @@ -0,0 +1,3 @@ +template: doc.html + +Coming soon. \ No newline at end of file diff --git a/doc/site/tune.rst b/doc/site/tunning.rst similarity index 76% rename from doc/site/tune.rst rename to doc/site/tunning.rst index 25c49048..c7632a4f 100644 --- a/doc/site/tune.rst +++ b/doc/site/tunning.rst @@ -1,5 +1,15 @@ template: doc.html + +Gunicorn performances are good enough for most cases. Most often performances can be improved in your application. + +Unicorn configgration +---------------------- + +See `Configuration `_ for more informations. + +- worker_processes should be scaled to the number of processes your backend system(s) can support. DO NOT scale it to the number of external network clients your application expects to be serving. Gunicorn is **NOT** for serving slow clients, that is the job of `nginx `_. + Kernel Parameters ----------------- diff --git a/doc/templates/doc.html b/doc/templates/doc.html index b03b3b2c..10240944 100644 --- a/doc/templates/doc.html +++ b/doc/templates/doc.html @@ -9,7 +9,7 @@
  • Installation
  • Usage
  • Configuration
  • -
  • Tune
  • +
  • Tunning
  • FAQ
  • diff --git a/doc/templates/index.html b/doc/templates/index.html index 8d4d842f..38189355 100644 --- a/doc/templates/index.html +++ b/doc/templates/index.html @@ -7,7 +7,7 @@
  • Installation
  • Usage
  • Configuration
  • -
  • Tune
  • +
  • Tunning
  • FAQ
  • {% endblock %} diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 31dfb1ec..e9efa560 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -366,7 +366,7 @@ class Arbiter(object): # Process Child worker_pid = os.getpid() try: - self.log.info("Worker %s booting" % worker_pid) + self.log.debug("Worker %s booting" % worker_pid) self.conf.after_fork(self, worker) worker.run() sys.exit(0)