Skip to content

Commit 8f29782

Browse files
committed
Reduce the mmap minimum size
Reduce the initial mmap file size from 1MiB to 64KiB. This should reduce the memory and disk overhead for larger numbers of multiprocess workers. Signed-off-by: SuperQ <[email protected]>
1 parent db391db commit 8f29782

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prometheus_client/mmap_dict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
import struct
55

6-
_INITIAL_MMAP_SIZE = 1 << 20
6+
_INITIAL_MMAP_SIZE = 1 << 16
77
_pack_integer_func = struct.Struct(b'i').pack
88
_pack_double_func = struct.Struct(b'd').pack
99
_unpack_integer = struct.Struct(b'i').unpack_from

0 commit comments

Comments
 (0)