Significance of absolute accurate `used_memory`?
lipzhu opened this issue · comments
Lipeng Zhu commented
The problem/use-case that the feature addresses
Currently, when call the zmalloc/zfree related functions, it will call the zmalloc_size and atomic operations to update used_memory
, these are all costly operations, is it worth to put such expensive operation in a frequently low API?
Some pull requests are submitted to optimize for such kind of this issue.
Alternatives you've considered
Maybe we can consider to remove the absolute accurate property of used_memory
to trade off between the performance?