[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Make spike size configurable
Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria.mit.edu:/tmp/cvs-serv8117/server
Modified Files:
ServerConfig.py MMTPServer.py
Log Message:
Make spike size configurable
Index: ServerConfig.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerConfig.py,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- ServerConfig.py 7 Mar 2004 06:31:46 -0000 1.53
+++ ServerConfig.py 23 Mar 2004 00:09:24 -0000 1.54
@@ -349,6 +349,7 @@
'MixPoolMinSize' : ('ALLOW', "int", "5"),
'Timeout' : ('ALLOW', "interval", "5 min"),
'MaxBandwidth' : ('ALLOW', "size", None),
+ 'MaxBandwidthSpike' : ('ALLOW', "size", None),
},
'DirectoryServers' : { # '__SECTION__' : ('REQUIRE', None, None),
'ServerURL' : ('ALLOW*', None, None),
Index: MMTPServer.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/MMTPServer.py,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- MMTPServer.py 7 Mar 2004 21:27:27 -0000 1.83
+++ MMTPServer.py 23 Mar 2004 00:09:24 -0000 1.84
@@ -168,8 +168,8 @@
def setBandwidth(self, n, maxBucket=None):
"""Set bandwidth limitations for this server
n -- maximum bytes-per-second to use, on average.
- maxBucket -- maximum bytes to send in a single burst. Defaults
- to n*5.
+ maxBucket -- maximum bytes to send in a single burst.
+ Defaults to n*5.
Setting n to None removes bandwidth limiting."""
if n is None:
@@ -532,7 +532,8 @@
self.maxClientConnections = config['Outgoing/MMTP'].get(
'MaxConnections', 16)
maxbw = config['Server'].get('MaxBandwidth', None)
- self.setBandwidth(maxbw)
+ maxbwspike = config['Server'].get('MaxBandwidthSpike', None)
+ self.setBandwidth(maxbw, maxbwspike)
# Don't always listen; don't always retransmit!
# FFFF Support listening on multiple IPs