0

I am analysing a redis instance on GCP(memorystore).The inbuits metrics given are not very helpful. Can someone guide on how to generate following metrics data?

Q1) How to visualize the data. What is the size of key and value stored in redis?

Q2) What is the max amount of read and write(Bytes/second) that has happened on this instance? Need this info to move data from redis to some other third party cache.

Mehul Parmar
  • 347
  • 4
  • 21
  • Have you checked this [StackOverflow thread](https://stackoverflow.com/questions/68417738/how-to-perform-keys-read-write-delete-on-google-memory-store-of-rediscache)? – Roopa M Jul 12 '22 at 08:58

2 Answers2

1

I am not sure what is GCP, but I believe you can connect to the redis server/instance and send command to it

Q1) How to visualize the data. What is the size of key and value stored in redis?

I believe the return of redis command "info" will provide the information

 'db0': {'avg_ttl': 210212973, 'expires': 2085105, 'keys': 91596761},
 'used_memory': 26148305568,
 'used_memory_human': '24.35G',

Q2) What is the max amount of read and write(Bytes/second) that has happened on this instance? Need this info to move data from redis to some other third party cache.

again, info command

 'total_commands_processed': 304162093545,
 'total_connections_received': 41080975,
 'total_net_input_bytes': 19646063598276,
 'total_net_output_bytes': 14474989999062,

I believe you can call the info command like every 1 second for 10 seconds and manually calculate the avg read/write(Bytes/second).

And run the script every minute. And you get the daily trend

Hi computer
  • 946
  • 4
  • 8
  • 19
  • gcp is google cloud platform. This redis is hosted on GCP not sure if all these commands are available. – Mehul Parmar Jul 12 '22 at 07:43
  • ok, so I think you need to get the result of "info" command first – Hi computer Jul 12 '22 at 07:48
  • info command is just providing total data processed. I need at a given point of time 1) Which tuple is there which has value more than 200 KB 2) What is the max amount of read and write(Bytes/second) that has happened at a given instant – Mehul Parmar Jul 18 '22 at 15:51
1
  • The In-built Redis Monitoring metrics exposed by Google Cloud are all listed here and you should be able to use a few of them for your purpose.
  • Keep in mind that the above is a time-series based database and hence if you are looking at a different aggregation, you can adjust the aggregate formula that you want in the Metrics Explorer.
  • If you are looking at purely benchmarking stuff, you can possibly look at the Redis Benchmarking tool
Romin
  • 8,708
  • 2
  • 24
  • 28