From ff222e3ffde634428adad350c53f7aa793bb579d Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 7 Mar 2008 04:13:21 +0000 Subject: [PATCH] -Adjust timings to be not noticably slower, but slow enough to allow the management node to work with a larger scale of clients git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@722 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/sbin/xcatd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/sbin/xcatd b/xCAT-server-2.0/sbin/xcatd index 75aefe7c1..cdec46be0 100755 --- a/xCAT-server-2.0/sbin/xcatd +++ b/xCAT-server-2.0/sbin/xcatd @@ -8,6 +8,7 @@ use lib "$::XCATROOT/lib/perl"; use Storable qw(freeze thaw); use xCAT::Utils; use File::Path; +use Time::HiRes qw(sleep); use xCAT::Client submit_request; use IO::Socket::SSL; @@ -629,7 +630,7 @@ sub dispatch_callback { sub relay_dispatch { my $fds = shift; - my @ready_ins = $fds->can_read(0.2); + my @ready_ins = $fds->can_read(1); foreach my $rin (@ready_ins) { my $data; if ($data = <$rin>) { @@ -644,6 +645,7 @@ sub relay_dispatch { close($rin); } } + sleep (0.01); #Again, try not to overwhelm the system return scalar(@ready_ins); } @@ -912,6 +914,7 @@ sub relay_fds { #Relays file descriptors from pipes to children to the SSL socke close($rfh); } } + sleep (0.01); #This gets called in a loop a lot, this takes the edge off return $rc; }