Skip to content

Commit

Permalink
issue #139: core: bump CHUNK_SIZE from 16kb to 128Kb
Browse files Browse the repository at this point in the history
Reduces the number of IO loop iterations required to receive large
messages at a small cost to RAM usage.

Note that when calling read() with a large buffer value like this,
Python must zero-allocate that much RAM. In other words, for even a
single byte received, 128kb of RAM might need to be written.
Consequently CHUNK_SIZE is quite a sensitive value and this might need
further tuning.
  • Loading branch information
dw committed Mar 15, 2018
1 parent 8ab8d4a commit abeb79d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mitogen/core.py
Expand Up @@ -67,7 +67,7 @@
SHUTDOWN = 105
LOAD_MODULE = 106

CHUNK_SIZE = 16384
CHUNK_SIZE = 131072
_tls = threading.local()


Expand Down

0 comments on commit abeb79d

Please sign in to comment.