Sharing Foswiki on VPS node requires increased niceness.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Sharing Foswiki on VPS node requires increased niceness.

Raymond Lutz
I have a problem sharing a VPS because Foswiki tends to be a processor
hog and other node users complain.
I added this line to Foswiki/Engine.pm

in the run method:

setpriority (0, 0, 19);

which increases "niceness" to 19, thus reducing its priority to a minimum.
I know this is not universally portable but it seems to go a long way to
solving my problem.

sub run {
     setpriority (0, 0, 19);    # reduce priority with niceness of 19

     my $this = shift;
     my $req  = $this->prepare();
     if ( defined $req ) {
         my $res = Foswiki::UI::handleRequest($req);
         $this->finalize( $res, $req );

-- Ray Lutz

Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Foswiki-discuss mailing list
[hidden email]