comparison mercurial/help/config.txt @ 29748:5e2365698d44

hgweb: config option to control zlib compression level Before this patch, the HTTP transport protocol would always zlib compress certain responses (notably "getbundle" wire protocol commands) at zlib compression level 6. zlib can be a massive CPU resource sink for servers. Some server operators may wish to reduce server-side CPU requirements while requiring more bandwidth. This is common on corporate intranets, for example. Others may wish to use more CPU but reduce bandwidth. This patch introduces a config option to allow server operators to control the zlib compression level. On the "mozilla-unified" generaldelta repository, setting this value to "0" (disable compression) results in server-side CPU utilization for a `hg clone` going from ~180s to ~124s CPU time on my i7-6700K. A level of "1" (which increases the transfer size from ~1,074 MB at level 6 to ~1,222 MB) utilizes ~132s CPU time.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 07 Aug 2016 18:09:58 -0700
parents 512611246ea4
children 531e85eec23c
comparison
equal deleted inserted replaced
29747:aba2bb2a6d0f 29748:5e2365698d44
1555 Large repositories using the *generaldelta* storage format should 1555 Large repositories using the *generaldelta* storage format should
1556 consider setting this option because converting *generaldelta* 1556 consider setting this option because converting *generaldelta*
1557 repositories to the exchange format required by the bundle1 data 1557 repositories to the exchange format required by the bundle1 data
1558 format can consume a lot of CPU. 1558 format can consume a lot of CPU.
1559 1559
1560 ``zliblevel``
1561 Integer between ``-1`` and ``9`` that controls the zlib compression level
1562 for wire protocol commands that send zlib compressed output (notably the
1563 commands that send repository history data).
1564
1565 The default (``-1``) uses the default zlib compression level, which is
1566 likely equivalent to ``6``. ``0`` means no compression. ``9`` means
1567 maximum compression.
1568
1569 Setting this option allows server operators to make trade-offs between
1570 bandwidth and CPU used. Lowering the compression lowers CPU utilization
1571 but sends more bytes to clients.
1572
1573 This option only impacts the HTTP server.
1574
1560 ``smtp`` 1575 ``smtp``
1561 -------- 1576 --------
1562 1577
1563 Configuration for extensions that need to send email messages. 1578 Configuration for extensions that need to send email messages.
1564 1579