Rev 3809: Change to a 5MB request chunk, and add a bit more debug logging. in http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/remote_readv_sections

John Arbash Meinel john at arbash-meinel.com
Wed Oct 29 18:53:26 GMT 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/remote_readv_sections

------------------------------------------------------------
revno: 3809
revision-id: john at arbash-meinel.com-20081029185313-ftm8kk89jhg452tk
parent: john at arbash-meinel.com-20081029185002-pq7pky4jat7gtcyx
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: remote_readv_sections
timestamp: Wed 2008-10-29 13:53:13 -0500
message:
  Change to a 5MB request chunk, and add a bit more debug logging.
-------------- next part --------------
=== modified file 'bzrlib/transport/remote.py'
--- a/bzrlib/transport/remote.py	2008-10-29 18:50:02 +0000
+++ b/bzrlib/transport/remote.py	2008-10-29 18:53:13 +0000
@@ -60,8 +60,8 @@
     RemoteTCPTransport, etc.
     """
 
-    # When making a readv request, cap it at requesting 50MB of data
-    _max_readv_bytes = 50*1024*1024
+    # When making a readv request, cap it at requesting 5MB of data
+    _max_readv_bytes = 5*1024*1024
 
     # IMPORTANT FOR IMPLEMENTORS: RemoteTransport MUST NOT be given encoding
     # responsibilities: Put those on SmartClient or similar. This is vital for
@@ -324,7 +324,7 @@
         cur_request = []
         cur_len = 0
         for c in coalesced:
-            if c.length + cur_len > self._max_readv_byte:
+            if c.length + cur_len > self._max_readv_bytes:
                 requests.append(cur_request)
                 cur_request = []
                 cur_len = 0
@@ -332,8 +332,9 @@
             cur_request.append(c)
             cur_len += c.length
         if 'hpss' in debug.debug_flags:
-            trace.mutter('readv %s offsets => %s coalesced => %s requests',
-                         len(offsets), len(coalesced), len(requests))
+            trace.mutter('%s.readv %s offsets => %s coalesced => %s requests',
+                         self.__class__.__name__, len(offsets), len(coalesced),
+                         len(requests))
         if cur_request:
             requests.append(cur_request)
         # Cache the results, but only until they have been fulfilled



More information about the bazaar-commits mailing list