diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-23 15:32:06 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-23 15:32:06 +0100 |
commit | 427b846c6c52194e5246bc913c65ac632f54f604 (patch) | |
tree | ebad996167eb6af33319b17165577c1c7dd39248 /src/fs | |
parent | 6f8ad5f4421b88d22cdb67e0188de132a0031cbc (diff) | |
download | gnunet-427b846c6c52194e5246bc913c65ac632f54f604.tar.gz gnunet-427b846c6c52194e5246bc913c65ac632f54f604.zip |
optimize queue-full case, reduce max queue size due to O(n) operation
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs.conf.in | 2 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/fs/fs.conf.in b/src/fs/fs.conf.in index 3534378ae..d46de387f 100644 --- a/src/fs/fs.conf.in +++ b/src/fs/fs.conf.in | |||
@@ -36,7 +36,7 @@ MAX_PENDING_REQUESTS = 65536 | |||
36 | 36 | ||
37 | # How many requests do we have at most waiting in the queue towards | 37 | # How many requests do we have at most waiting in the queue towards |
38 | # the datastore? (important for memory consumption) | 38 | # the datastore? (important for memory consumption) |
39 | DATASTORE_QUEUE_SIZE = 1024 | 39 | DATASTORE_QUEUE_SIZE = 32 |
40 | 40 | ||
41 | # Maximum frequency we're allowed to poll the datastore | 41 | # Maximum frequency we're allowed to poll the datastore |
42 | # for content for migration (can be used to reduce | 42 | # for content for migration (can be used to reduce |
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 8c605c6a2..256d0c2b8 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -1349,7 +1349,7 @@ run (void *cls, | |||
1349 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_INFO, | 1349 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_INFO, |
1350 | "fs", | 1350 | "fs", |
1351 | "DATASTORE_QUEUE_SIZE"); | 1351 | "DATASTORE_QUEUE_SIZE"); |
1352 | dqs = 1024; | 1352 | dqs = 32; |
1353 | } | 1353 | } |
1354 | GSF_datastore_queue_size = (unsigned int) dqs; | 1354 | GSF_datastore_queue_size = (unsigned int) dqs; |
1355 | GSF_enable_randomized_delays = | 1355 | GSF_enable_randomized_delays = |