< gmaxwell> the leveldb logging with debug=1 is obnoxious, now I see why jnewbery wanted the exclude.
< gmaxwell> wumpus: uh. so boolean operations don't appear to exist for scoped enums. so ... I don't think I can use them without defining a set of boolean operations for them.
< sipa> gmaxwell: eh?
< sipa> ah, scoped enums don't have an implicit conversion to int
< sipa> you can still explicitly convert them, though
< sipa> but enums are generally a bad approach for bitfields, as they're intended to be exhaustive
< gmaxwell> sipa: wumpus suggested that I change the log print thing to use a scoped enum. The original thing that inspired this change is that rebroad wanted to do some horrible hack to do the logical equivilent of LogPrint(LOG_NET | LOG_MEMPOOL, ...). (and of course the matching also uses it as a bitfield.)
< sipa> right, a normal enum (which behaves much more like an int) may be more appropriate
< gmaxwell> well thats what I implemented.
< sipa> awesöme
< gmaxwell> in any case. I'm happy to change it to whatever. someone who has an opinion needs to tell me what to do. I think I only need a couple casts to make the enum class stuff go, but it would be ugly to do "LogPrint(LOG_NET | LOG_MEMPOOL," later unless we provide | for the type.
< * gmaxwell> copies the conversation into github
< bitcoin-git> [bitcoin] MarcoFalke pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/edc62c959ab3...8e4f7e72410d
< bitcoin-git> bitcoin/master c0651cc Kyle Honeycutt: Update bitcoin.conf with example for pruning...
< bitcoin-git> bitcoin/master 8e4f7e7 MarcoFalke: Merge #10090: Update bitcoin.conf with example for pruning...
< bitcoin-git> [bitcoin] MarcoFalke closed pull request #10090: Update bitcoin.conf with example for pruning (master...patch-1) https://github.com/bitcoin/bitcoin/pull/10090
< bitcoin-git> [bitcoin] laanwj pushed 4 new commits to master: https://github.com/bitcoin/bitcoin/compare/8e4f7e72410d...de301b048810
< bitcoin-git> bitcoin/master eb66bf9 Awemany: bitcoin-tx: Fix missing range check...
< bitcoin-git> bitcoin/master 21704f6 John Newbery: Check stderr when testing bitcoin-tx
< bitcoin-git> bitcoin/master 19ecd1e John Newbery: Add tests for bitcoin-tx input checking
< bitcoin-git> [bitcoin] laanwj closed pull request #10130: bitcoin-tx input verification (awemany, jnewbery) (master...bitcoin_tx_input_sanitiser) https://github.com/bitcoin/bitcoin/pull/10130
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/de301b048810...ba12b3a84469
< bitcoin-git> bitcoin/master 625488a Wladimir J. van der Laan: util: Work around (virtual) memory exhaustion on 32-bit w/ glibc...
< bitcoin-git> bitcoin/master ba12b3a Wladimir J. van der Laan: Merge #10120: util: Work around (virtual) memory exhaustion on 32-bit w/ glibc...
< bitcoin-git> [bitcoin] laanwj closed pull request #10120: util: Work around (virtual) memory exhaustion on 32-bit w/ glibc (master...2017_03_address_space_exhaustion_workaround) https://github.com/bitcoin/bitcoin/pull/10120
< sipa> wumpus: have we ever done benchmarks for the performamce impact of having only 1 (or 2) arenas?
< wumpus> sipa: afaik, no. I've only done that on systems that would crash otherwise
< wumpus> so no way to compare :)
< sipa> infinite speedup, on those systems!
< wumpus> exactly!
< gmaxwell> for 32bit I don't think we really have a choice, in any case.
< wumpus> yes. the question is do we also want to customize arenas on 64-bit
< gmaxwell> sipa pointed out today that we really need to test that with network syncs since a chainstate reindex isn't really multithreaded in terms of malloc activity.
< wumpus> though I don't think so, I think on the longer run we should address leveldb's mismanagement of memory instead, as it's the largest reason we can't get along with many arenas
< gmaxwell> Also I made the observation that the mempool on disk likely increased our memory usage in the presence of multiple areans, because instead of only having two threads with substantial allocations it resulted in three.
< wumpus> yes
< gmaxwell> earlier I proposed a new database durability strategy to pieter that, if it works, will let us radically reduce peak memory usage.
< wumpus> and yes it may very well be that arenas doesn't help at all for our use case, but yes, profiling would make sense
< gmaxwell> (by elimiating large batch writes)
< wumpus> the glibc allocator also has some other 'tunables' that may have an effect on performance
< wumpus> gmaxwell: ok great!
< bitcoin-git> [bitcoin] laanwj pushed 4 new commits to 0.14: https://github.com/bitcoin/bitcoin/compare/b768202695a0...e4c9a90fe9aa
< bitcoin-git> bitcoin/0.14 04c21af Awemany: bitcoin-tx: Fix missing range check...
< bitcoin-git> bitcoin/0.14 ecc5232 John Newbery: Check stderr when testing bitcoin-tx...
< bitcoin-git> bitcoin/0.14 f59e3df John Newbery: Add tests for bitcoin-tx input checking...
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/ba12b3a84469...9ab26bf7e428
< bitcoin-git> bitcoin/master 7228ce8 Pieter Wuille: Compensate for memory peak at flush time
< bitcoin-git> bitcoin/master 9ab26bf Wladimir J. van der Laan: Merge #10126: Compensate for memory peak at flush time...
< bitcoin-git> [bitcoin] laanwj closed pull request #10126: Compensate for memory peak at flush time (master...peak_compensation) https://github.com/bitcoin/bitcoin/pull/10126
< bitcoin-git> [bitcoin] laanwj closed pull request #10127: [0.14 backport] Mining: Prevent slowdown in CreateNewBlock on large mempools (0.14...2017-03-backport-cnb-optimizations) https://github.com/bitcoin/bitcoin/pull/10127
< bitcoin-git> [bitcoin] laanwj pushed 1 new commit to 0.14: https://github.com/bitcoin/bitcoin/commit/0b5e162b84ec95cb63903dd21e4003a3d4503421
< bitcoin-git> bitcoin/0.14 0b5e162 Pieter Wuille: Compensate for memory peak at flush time...
< wumpus> last call for 0.14.1
< bitcoin-git> [bitcoin] laanwj pushed 4 new commits to master: https://github.com/bitcoin/bitcoin/compare/9ab26bf7e428...4aa07fa73569
< bitcoin-git> bitcoin/master e6dcfee Wladimir J. van der Laan: refactor: Move GetDifficulty out of `rpc/server.h`...
< bitcoin-git> bitcoin/master 8d8f28d Wladimir J. van der Laan: refactor: Move RPCNotifyBlockChange out of `rpc/server.h`
< bitcoin-git> bitcoin/master f885b67 Wladimir J. van der Laan: refactor: Make rest.cpp dependency on `*toJSON` in `blockchain.cpp` explicit
< bitcoin-git> [bitcoin] laanwj closed pull request #10095: refactor: Move GetDifficulty out of `rpc/server.h` (master...2017_03_getdifficulty_header) https://github.com/bitcoin/bitcoin/pull/10095
< wumpus> will tag 0.14.1rc1 in a bit
< wumpus> never mind, won't tag 0.14.1rc1 today
< Victorsueca> wumpus: a wild bug appeared?
< wumpus> no
< wumpus> apparently #10126 reduces the dbache too much
< gribble> https://github.com/bitcoin/bitcoin/issues/10126 | Compensate for memory peak at flush time by sipa · Pull Request #10126 · bitcoin/bitcoin · GitHub
< wumpus> not really a bug, I guess, but also not desirable for a release
< bitcoin-git> [bitcoin] morcos opened pull request #10133: Clean up calculations of pcoinsTip memory usage (master...cachememory) https://github.com/bitcoin/bitcoin/pull/10133
< morcos> wumpus: ok take a look at that. This would be my recommendation, but I broke it up into commits so we can talk about what makes sense for 0.14.1 and what doesn't....
< morcos> I care primarily about the first commit
< morcos> sipa: i was trying to reason about whether we need the 2x factor in the rollback test
< morcos> i went back and forth.
< morcos> is it true that non-dirty entries in the pcoinstip aren't subject to a 2x usage on flush?
< morcos> if so then i guess i agree...
< sipa> morcos: right
< morcos> but certainly if pcoinstip grows which it will in the rollback, and then it will be flushed later...
< sipa> are you sure? i thought we changed that test to not use the main cache
< morcos> pcoinstip will grow, but will only grow with non-dirty entries
< morcos> for instance if your tip is block 100, you flushed after block 99 and you are rolling back block 99, won't pcoinstip get the outputs created in block 99 pulled into it
< morcos> which will be marked dirty in coins, but never flushed to pcoinstip
< sipa> morcos: pcoinstip is not involved in the rollback test at all
< sipa> it uses a private cache on top of pcoinsdb
< morcos> oh... i missed that
< sipa> if (!CVerifyDB().VerifyDB(chainparams, pcoinsdbview, GetArg("-checklevel", DEFAULT_CHECKLEVEL),
< morcos> i assumed coins was built on top of pcoinstip
< sipa> it used to be, but it caused a memory blowup that quickly caused a flush afterwards anyway
< morcos> ok, then i agree completely unnecessary there... will remove
< morcos> while we're at it.. are you ok with the other changes.. i might as well get it to mergeable state.. i agree this is all relatively minor
< morcos> ugh.. wait on #10133..
< gribble> https://github.com/bitcoin/bitcoin/issues/10133 | Clean up calculations of pcoinsTip memory usage by morcos · Pull Request #10133 · bitcoin/bitcoin · GitHub
< morcos> oh nm, maybe its fine.. i was just confusing myself with whether the 90% is still the right number, but you are comparing the doubled calculation with the 90% number, so it is fine
< bitcoin-git> [bitcoin] sdaftuar opened pull request #10134: [qa] Fixes segwit block relay test after inv-direct-fetch was disabled (master...2017-03-fix-segwit-relay-test) https://github.com/bitcoin/bitcoin/pull/10134
< bitcoin-git> [bitcoin] jnewbery opened pull request #10135: Send the correct error code in reject messages (master...correctrejectmessages) https://github.com/bitcoin/bitcoin/pull/10135
< bitcoin-git> [bitcoin] jnewbery closed pull request #10123: Allow debug logs to be excluded from specified component (master...debugexclude) https://github.com/bitcoin/bitcoin/pull/10123