MEMORY USAGE key [SAMPLES count]
Time complexity: O(N) where N is the number of samples.
The reported usage is the total of memory allocations for data and administrative overheads that a key its value require.
With Redis v4.0.1 64-bit and jemalloc, the empty string measures as follows:
> MEMORY USAGE foo
(integer) 54
OK
127.0.0.1:6379> MEMORY USAGE cento
*Return value
: the memory usage in bytes