Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…otprint.
  • Loading branch information...
commit 53cca0a8d3e9eb9fb8c7d04d6b8aeade4e93db08 1 parent 797f3e0
@miyagawa authored
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
5 README
@@ -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
6 lib/Nomo.pm
@@ -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
7 lib/Nomo/Server.pm
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.