Skip to content

Commit

Permalink
Clean up the terminology in the manual.
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Jul 18, 2012
1 parent 86f5c5f commit e381ef9
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 71 deletions.
4 changes: 4 additions & 0 deletions doc/Users guide Apache.idmap.txt
Expand Up @@ -24,6 +24,10 @@

11.1. Application root => application-root-otx6xf

11.2. Idle process => idle-process-potb6g

11.3. Inactive process => inactive-process-16gjv2e

12. Appendix C: Spawning methods explained => appendix-c-spawning-methods-explained-owghi9

12.1. The most straightforward and traditional way: conservative spawning => the-most-straightforward-and-traditional-way-conservative-spawning-1ybbli2
Expand Down
76 changes: 39 additions & 37 deletions doc/Users guide Apache.txt
Expand Up @@ -922,9 +922,9 @@ responses, protection is provided against slow HTTP clients that can not read yo
response immediately.

For example, consider an HTTP client that's on a dial-up modem link, and your
application instance generates a 2 MB response. If response buffering is turned
off then your application instance will be blocked until the entire 2 MB has been
sent out to the HTTP client. This disallows your application instance to do any useful
application process generates a 2 MB response. If response buffering is turned
off then your application process will be blocked until the entire 2 MB has been
sent out to the HTTP client. This disallows your application process to do any useful
work in the mean time. By enabling response buffering, Phusion Passenger will read
the application response as quickly as possible and will take care of slow clients.

Expand Down Expand Up @@ -1063,14 +1063,14 @@ In each place, it may be specified at most once. The default value is 'on'.
=== Resource control and optimization options ===

==== PassengerMaxPoolSize <integer> ====
The maximum number of Ruby on Rails or Rack application instances that may
be simultaneously active. A larger number results in higher memory usage,
The maximum number of <<application_process,application processes>> that may
simultaneously exist. A larger number results in higher memory usage,
but improved ability to handle concurrent HTTP clients.

The optimal value depends on your system's hardware and the server's average
load. You should experiment with different values. But generally speaking,
the value should be at least equal to the number of CPUs (or CPU cores) that
you have. If your system has 2 GB of RAM, then we recommend a value of '30'.
you have. If your system has 2 GB of RAM, then we recommend a value of '15'.
If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
is also running other services such as MySQL, then we recommend a value of '2'.

Expand All @@ -1084,23 +1084,23 @@ The default value is '6'.

TIP: We strongly recommend you to <<reducing_memory_usage,use Ruby Enterprise
Edition>>. This allows you to reduce the memory usage of your Ruby on Rails applications
by about 33%. And it's not hard to install.
by about 33%, and it's not hard to install.

[[PassengerMinInstances]]
==== PassengerMinInstances <integer> ====
This specifies the minimum number of application instances that must be kept around
whenever Phusion Passenger cleans up idle instances. You should set this option to a
This specifies the minimum number of application processes that should exist for a
given application. You should set this option to a
non-zero value if you want to avoid potentially long startup times after a website
has been idle for an extended period.
has been <<idle_process,idle>> for an extended period.

Please note that this option does *not* pre-start application instances during Apache
Please note that this option does *not* pre-start application processes during Apache
startup. It just makes sure that when the application is first accessed:

1. at least the given number of instances will be spawned.
2. the given number of processes will be kept around even when instances are being
1. at least the given number of processes will be spawned.
2. the given number of processes will be kept around even when processes are being
idle cleaned (see <<PassengerPoolIdleTime,PassengerPoolIdleTime>>).

If you want to pre-start application instances during Apache startup, then you should use the <<PassengerPreStart,PassengerPreStart>> directive, possibly in combination with
If you want to pre-start application processes during Apache startup, then you should use the <<PassengerPreStart,PassengerPreStart>> directive, possibly in combination with
'PassengerMinInstances'. This behavior might seem counter-intuitive at first sight,
but <<PassengerPreStart,PassengerPreStart>> explains the rationale behind it.

Expand All @@ -1117,16 +1117,16 @@ PassengerPoolIdleTime 10
</VirtualHost>
---------------------------------

When you start Apache, there are 0 application instances for 'foobar.com'. Things will
When you start Apache, there are 0 application processes for 'foobar.com'. Things will
stay that way until someone visits 'foobar.com'. Suppose that there is only 1 visitor.
1 application instance will be started immediately to serve the visitor, while 2 will
1 application process will be started immediately to serve the visitor, while 2 will
be spawned in the background. After 10 seconds, when the idle timeout has
been reached, these 3 application instances will not be cleaned up.
been reached, these 3 application processes will not be cleaned up.

Now suppose that there's a sudden spike of traffic, and 100 users visit 'foobar.com'
simultanously. Phusion Passenger will start 12 more application instances. After the idle
simultanously. Phusion Passenger will start 12 more application processes. After the idle
timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
instances, keeping 3 instances around.
processes, keeping 3 processes around.

The PassengerMinInstances option may occur in the following places:

Expand All @@ -1138,12 +1138,12 @@ The PassengerMinInstances option may occur in the following places:
In each place, it may be specified at most once. The default value is '1'.

==== PassengerMaxInstancesPerApp <integer> ====
The maximum number of application instances that may be simultaneously active
The maximum number of application processes that may simultaneously exist
for a single application. This helps to make sure that a single application
will not occupy all available slots in the application pool.

This value must be less than <<PassengerMaxPoolSize,PassengerMaxPoolSize>>. A value of 0
means that there is no limit placed on the number of instances a single application
means that there is no limit placed on the number of processes a single application
may use, i.e. only the global limit of <<PassengerMaxPoolSize,PassengerMaxPoolSize>>
will be enforced.

Expand All @@ -1152,8 +1152,8 @@ The default value is '0'.

[[PassengerPoolIdleTime]]
==== PassengerPoolIdleTime <integer> ====
The maximum number of seconds that an application instance may be idle. That is,
if an application instance hasn't received any traffic after the given number of
The maximum number of seconds that an application process may be idle. That is,
if an application process hasn't received any traffic after the given number of
seconds, then it will be shutdown in order to conserve memory.

Decreasing this value means that applications will have to be spawned
Expand All @@ -1166,10 +1166,10 @@ Rails/Rack web page. We recommend a value of `2 * x`, where `x` is the average
number of seconds that a visitor spends on a single Rails/Rack web page. But your
mileage may vary.

When this value is set to '0', application instances will not be shutdown unless
it's really necessary, i.e. when Phusion Passenger is out of worker processes
for a given application and one of the inactive application instances needs to
make place for another application instance. Setting the value to 0 is
When this value is set to '0', application processes will not be shutdown unless
it's really necessary, i.e. when Phusion Passenger is out of application processes
for a given application and one of the <<inactive_process,inactive application processes>> needs to
make place for another application process. Setting the value to 0 is
recommended if you're on a non-shared host that's only running a few
applications, each which must be available at all times.

Expand All @@ -1178,10 +1178,10 @@ The default value is '300'.

[[PassengerMaxRequests]]
==== PassengerMaxRequests <integer> ====
The maximum number of requests an application instance will process. After
serving that many requests, the application instance will be shut down and
The maximum number of requests an application process will process. After
serving that many requests, the application process will be shut down and
Phusion Passenger will restart it. A value of 0 means that there is no maximum:
an application instance will thus be shut down when its idle timeout has been
an application process will thus be shut down when its idle timeout has been
reached.

This option is useful if your application is leaking memory. By shutting
Expand Down Expand Up @@ -1236,11 +1236,11 @@ In each place, it may be specified at most once. The default value is '0'.

[[PassengerPreStart]]
==== PassengerPreStart <url> ====
By default, Phusion Passenger does not start any application instances until said
By default, Phusion Passenger does not start any application processes until said
web application is first accessed. The result is that the first visitor of said
web application might experience a small delay as Phusion Passenger is starting
the web application on demand. If that is undesirable, then this directive can be
used to pre-started application instances during Apache startup.
used to pre-started application processes during Apache startup.

A few things to be careful of:

Expand All @@ -1254,7 +1254,7 @@ A few things to be careful of:
* The path part of the URL must point to some URI that the web application
handles.
- You will probably want to combine this option with
<<PassengerMinInstances,PassengerMinInstances>> because application instances
<<PassengerMinInstances,PassengerMinInstances>> because application processes
started with 'PassengerPreStart' are subject to the usual idle timeout rules.
See the example below for an explanation.

Expand Down Expand Up @@ -1335,10 +1335,10 @@ PassengerPreStart http://myblog.com/ # <----- WRONG! Missing "/store" part.

===== Example 3: combining with PassengerMinInstances =====

Application instances started with PassengerPreStart are
Application processes started with PassengerPreStart are
also subject to the idle timeout rules as specified by
<<PassengerPoolIdleTime,PassengerPoolIdleTime>>! That means that by default,
the pre-started application instances for foo.com are bar.com are shut down
the pre-started application processes for foo.com are bar.com are shut down
after a few minutes of inactivity. If you don't want that to happen, then
you should combine PassengerPreStart with
<<PassengerMinInstances,PassengerMinInstances>>, like this:
Expand All @@ -1347,13 +1347,15 @@ you should combine PassengerPreStart with
<VirtualHost *:80>
ServerName foo.com
DocumentRoot /webapps/foo/public
PassengerMinInstances 1 # <--- added
# Added!
PassengerMinInstances 1
</VirtualHost>

<VirtualHost *:3500>
ServerName bar.com
DocumentRoot /webapps/bar/public
PassengerMinInstances 1 # <--- added
# Added!
PassengerMinInstances 1
</VirtualHost>

PassengerPreStart http://foo.com/
Expand Down
4 changes: 4 additions & 0 deletions doc/Users guide Nginx.idmap.txt
Expand Up @@ -22,6 +22,10 @@

10.1. Application root => application-root-1fd6bqv

10.2. Idle process => idle-process-13byfw9

10.3. Inactive process => inactive-process-1d2h0po

11. Appendix C: Spawning methods explained => appendix-c-spawning-methods-explained-tcp8e6

11.1. The most straightforward and traditional way: conservative spawning => the-most-straightforward-and-traditional-way-conservative-spawning-civ29z
Expand Down

0 comments on commit e381ef9

Please sign in to comment.