diff --git a/src/ripple_core/nodestore/impl/DatabaseImp.h b/src/ripple_core/nodestore/impl/DatabaseImp.h index 92318902f..ebb98a5b7 100644 --- a/src/ripple_core/nodestore/impl/DatabaseImp.h +++ b/src/ripple_core/nodestore/impl/DatabaseImp.h @@ -130,7 +130,9 @@ public: int getDesiredAsyncReadCount () { // We prefer a client not fill our cache - return m_cache.getTargetSize() / 4; + // We don't want to push data out of the cache + // before it's retrieved + return m_cache.getTargetSize() / asyncDivider; } NodeObject::Ptr fetch (uint256 const& hash) diff --git a/src/ripple_core/nodestore/impl/Tuning.h b/src/ripple_core/nodestore/impl/Tuning.h index c5bb1cb85..dcacf9388 100644 --- a/src/ripple_core/nodestore/impl/Tuning.h +++ b/src/ripple_core/nodestore/impl/Tuning.h @@ -30,6 +30,9 @@ enum // Expiration time for cached nodes ,cacheTargetSeconds = 300 + + // Fraction of the cache one query source can take + ,asyncDivider = 8 }; }