When profiling where bitcoind was spending time and could be optimized, I noticed that the sigcache was locking twice per read. This seemed bad, and with Alex Morcos I was able to measure some bad contention. We put together a quick and dirty patch: we eliminated the unnecessary locking and used a lock-free queue to batch cleanup tasks. While Alex continued to look into the cache, I diverted my attention to other sources of contention. I found that the
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
travis_fold:start:worker_info | |
[0K[33;1mWorker information[0m | |
hostname: 151579ac-8915-47f0-94ea-d7ecbc718941@1.worker-org-95567d544-phbx9.gce-production-3 | |
version: v6.2.1 https://github.com/travis-ci/worker/tree/4e3246c044eb4915c2378ffacd0b3d3ed0136bba | |
instance: travis-job-ed9d5aca-3b0a-4c5c-84c6-428f469e206d travis-ci-stevonnie-xenial-1553530512-f909ac5 (via amqp) | |
startup: 6.920152873s | |
travis_fold:end:worker_info | |
[0Ktravis_time:start:29ebd9fc | |
[0Ktravis_time:end:29ebd9fc:start=1572552714744409971,finish=1572552714905957133,duration=161547162,event=no_world_writable_dirs | |
[0Ktravis_time:start:10b29a20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstddef> | |
static const size_t MAX_DEPTH = 32; | |
static const size_t NODE_WIDTH = 32; | |
static const size_t PROOF_SIZE_WIDTH = 33 + 32*32; | |
static const size_t MAX_STACK_SIZE = 1000; | |
static const size_t MAX_STACK_ELT_SIZE = 520; | |
static const size_t MAX_STACK_SIZE_BYTES = MAX_STACK_SIZE*MAX_STACK_ELT_SIZE; | |
static const size_t NBITS_STACK_WIDTH = 19; | |
static const size_t MAX_SCRIPT_SIZE_BYTES = 10000; | |
static const size_t NBITS_SCRIPT_WIDTH = 14; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{'simulating':'11CuckooCacheI7uint256N14sigcache_tests13uint256HasherEE', 'load':0.1, 'mb':1, 'n':3276, 'hit':1, 'insert':182, 'lookup':27} | |
{'simulating':'N14sigcache_tests12_GLOBAL__N_115CSignatureCacheE', 'load':0.1, 'mb':1, 'n':3276, 'hit':1, 'insert':156, 'lookup':60} | |
{'simulating':'11CuckooCacheI7uint256N14sigcache_tests13uint256HasherEE', 'load':0.1, 'mb':2, 'n':6553, 'hit':1, 'insert':286, 'lookup':53} | |
{'simulating':'N14sigcache_tests12_GLOBAL__N_115CSignatureCacheE', 'load':0.1, 'mb':2, 'n':6553, 'hit':1, 'insert':338, 'lookup':137} | |
{'simulating':'11CuckooCacheI7uint256N14sigcache_tests13uint256HasherEE', 'load':0.1, 'mb':3, 'n':9830, 'hit':1, 'insert':515, 'lookup':81} | |
{'simulating':'N14sigcache_tests12_GLOBAL__N_115CSignatureCacheE', 'load':0.1, 'mb':3, 'n':9830, 'hit':1, 'insert':635, 'lookup':209} | |
{'simulating':'11CuckooCacheI7uint256N14sigcache_tests13uint256HasherEE', 'load':0.1, 'mb':4, 'n':13107, 'hit':1, 'insert':631, 'lookup':107} | |
{'simulating':'N14sigcache_tests12_GLOBAL__N_115CSignatureCac |
BIP: ___ Title: Minimum Viable TXin Hash Author: Jeremy Rubin <[email protected]> Status: Draft Type: Standards Track Created: 2015-06-24
BIP: ___ Title: Short Term Use Addresses for Scalability Author: Jeremy Rubin <[email protected]> Status: Draft Type: Standards Track Created: 2015-06-23
NewerOlder