Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

redis memory usage

How to get redis memory usage through java. For example im getting the dbsize of redis through Jedis java class, using the ethod dbsize() method in that jedis class. Is there any similar method for getting the memory usage? Thanks in Advance.

like image 916
anand Avatar asked May 12 '11 10:05

anand


People also ask

How do I check my Redis memory usage?

You can collect all memory utilization metrics data for a Redis instance by running “info memory”.

Is Redis as fast as memory?

Redis is a remote data structure server. It is certainly slower than just storing the data in local memory (since it involves socket roundtrips to fetch/store the data).

Does Redis use server memory?

Performance. All Redis data resides in memory, which enables low latency and high throughput data access. Unlike traditional databases, In-memory data stores don't require a trip to disk, reducing engine latency to microseconds.


1 Answers

To get memory used my Redis, you can run the INFO command. It will give you a lot of useless info, but somewhere in there will be used_memory and used_memory_human

root@this:~# redis-cli
redis> info
redis_version:2.2.4
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:32
...
used_memory:551084
used_memory_human:538.17K
used_memory_rss:1249280
...
like image 130
Colum Avatar answered Sep 27 '22 00:09

Colum