reduce cache sizes
This commit is contained in:
parent
a5120d772c
commit
60a1c2ec20
2 changed files with 5 additions and 5 deletions
|
@ -26,7 +26,7 @@ class PrefixRow(metaclass=PrefixRowType):
|
||||||
key_struct: struct.Struct
|
key_struct: struct.Struct
|
||||||
value_struct: struct.Struct
|
value_struct: struct.Struct
|
||||||
key_part_lambdas = []
|
key_part_lambdas = []
|
||||||
cache_size: int = 1024 * 1024 * 64
|
cache_size: int = 1024 * 1024 * 16
|
||||||
|
|
||||||
def __init__(self, db: 'rocksdb.DB', op_stack: RevertableOpStack):
|
def __init__(self, db: 'rocksdb.DB', op_stack: RevertableOpStack):
|
||||||
self._db = db
|
self._db = db
|
||||||
|
|
|
@ -440,7 +440,7 @@ class ActiveAmountPrefixRow(PrefixRow):
|
||||||
struct.Struct(b'>20sBLL').pack,
|
struct.Struct(b'>20sBLL').pack,
|
||||||
struct.Struct(b'>20sBLLH').pack
|
struct.Struct(b'>20sBLLH').pack
|
||||||
]
|
]
|
||||||
cache_size = 1024 * 1024 * 128
|
cache_size = 1024 * 1024 * 64
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def pack_key(cls, claim_hash: bytes, txo_type: int, activation_height: int, tx_num: int, position: int):
|
def pack_key(cls, claim_hash: bytes, txo_type: int, activation_height: int, tx_num: int, position: int):
|
||||||
|
@ -471,7 +471,7 @@ class ClaimToTXOPrefixRow(PrefixRow):
|
||||||
lambda: b'',
|
lambda: b'',
|
||||||
struct.Struct(b'>20s').pack
|
struct.Struct(b'>20s').pack
|
||||||
]
|
]
|
||||||
cache_size = 1024 * 1024 * 128
|
cache_size = 1024 * 1024 * 64
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def pack_key(cls, claim_hash: bytes):
|
def pack_key(cls, claim_hash: bytes):
|
||||||
|
@ -511,7 +511,7 @@ class TXOToClaimPrefixRow(PrefixRow):
|
||||||
prefix = DB_PREFIXES.txo_to_claim.value
|
prefix = DB_PREFIXES.txo_to_claim.value
|
||||||
key_struct = struct.Struct(b'>LH')
|
key_struct = struct.Struct(b'>LH')
|
||||||
value_struct = struct.Struct(b'>20s')
|
value_struct = struct.Struct(b'>20s')
|
||||||
cache_size = 1024 * 1024 * 128
|
cache_size = 1024 * 1024 * 64
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def pack_key(cls, tx_num: int, position: int):
|
def pack_key(cls, tx_num: int, position: int):
|
||||||
|
@ -906,7 +906,7 @@ class EffectiveAmountPrefixRow(PrefixRow):
|
||||||
shortid_key_helper(b'>QL'),
|
shortid_key_helper(b'>QL'),
|
||||||
shortid_key_helper(b'>QLH'),
|
shortid_key_helper(b'>QLH'),
|
||||||
]
|
]
|
||||||
cache_size = 1024 * 1024 * 128
|
cache_size = 1024 * 1024 * 64
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def pack_key(cls, name: str, effective_amount: int, tx_num: int, position: int):
|
def pack_key(cls, name: str, effective_amount: int, tx_num: int, position: int):
|
||||||
|
|
Loading…
Reference in a new issue