Tweak settings (and add SLEEP_BEFORE_ROUND) to speed up updates

Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
This commit is contained in:
Vladimir Diaz 2018-03-27 14:41:33 -04:00
parent a058344901
commit 9685a4db1f
No known key found for this signature in database
GPG key ID: 5DEE9B97B0E2289A

View file

@ -82,14 +82,15 @@
SOCKET_TIMEOUT = 2 #seconds
# The maximum chunk of data, in bytes, we would download in every round.
CHUNK_SIZE = 8192 #bytes
#CHUNK_SIZE = 8192 #bytes
CHUNK_SIZE = 100000 #bytes
# The minimum average download speed (bytes/second) that must be met to
# avoid being considered as a slow retrieval attack.
MIN_AVERAGE_DOWNLOAD_SPEED = 100 #bytes/second
# The time (in seconds) we ignore a server with a slow initial retrieval speed.
SLOW_START_GRACE_PERIOD = 3 #seconds
SLOW_START_GRACE_PERIOD = 0.01 #seconds
# Software updaters that integrate the framework are required to specify
# the URL prefix for the mirrors that clients can contact to download updates.
@ -114,3 +115,9 @@
# bin delegations. The other instances (e.g., digest of files) that require a
# hashing algorithm rely on settings in the securesystemslib external library.
DEFAULT_HASH_ALGORITHM = 'sha256'
# The client's update procedure (contained within a while-loop) can potentially
# hog the CPU. The following setting can be used to force the update sequence
# to suspend execution for a specified amount of time. See
# theupdateframework/tuf/issue#338.
SLEEP_BEFORE_ROUND = None