Permalink
Browse files

Display the master/worker in the process list. Document the memory fo…

…otprint.
  • Loading branch information...
1 parent 797f3e0 commit 53cca0a8d3e9eb9fb8c7d04d6b8aeade4e93db08 @miyagawa committed Feb 10, 2010
Showing with 18 additions and 0 deletions.
  1. +5 −0 README
  2. +6 −0 lib/Nomo.pm
  3. +7 −0 lib/Nomo/Server.pm
View
@@ -32,6 +32,11 @@ DESCRIPTION
Multiple interfaces and UNIX Domain Socket support
Able to listen on multiple intefaces including UNIX sockets.
+ Small memory footprint
+ Preloading the applications enables copy-on-write friendly memory
+ management. Also, the minimum memory usage Nomo requires for the
+ master process is 7MB and children (workers) is less than 3.0MB.
+
PSGI compatible
Can run any PSGI applications and frameworks
View
@@ -55,6 +55,12 @@ Supports L<Server::Starter> for hot deploy and graceful restarts.
Able to listen on multiple intefaces including UNIX sockets.
+=item Small memory footprint
+
+Preloading the applications enables copy-on-write friendly memory
+management. Also, the minimum memory usage Nomo requires for the
+master process is 7MB and children (workers) is less than 3.0MB.
+
=item PSGI compatible
Can run any PSGI applications and frameworks
View
@@ -88,10 +88,17 @@ sub pre_loop_hook {
TTIN => sub { my $p = $self->{server}; $p->{$_}++ for qw( min_servers max_servers ) },
TTOU => sub { my $p = $self->{server}; $p->{$_}-- for qw( min_servers max_servers ) },
);
+
+ $0 = "nomo master " . join(" ", @{$self->{options}{argv}});
}
# The below methods run in the child process
+sub child_init_hook {
+ my $self = shift;
+ $0 = "nomo worker " . join(" ", @{$self->{options}{argv}});
+}
+
sub post_accept_hook {
my $self = shift;

0 comments on commit 53cca0a

Please sign in to comment.