简体   繁体   中英

Redis ttl payload memory size

I am wondering how much memory space does enabling TTL for a particular key will use. To be more precise, if I enable TTL for a key, how much memory does this settings will consume and how to check the memory consumption by setting such TTL?

TTL doesn't consume any extra space. The internal memory allocation for it is performed when creating a key, whether you use it or not.

PS IIRC, the TTL is a 64-bit variable, so it "costs" 8 bytes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM