Search code examples
google-cloud-platformredisgoogle-cloud-monitoringgoogle-cloud-memorystore

Perfomance metrics of memorystore (Redis on GCP) for data migration to different cache


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.


Solution

  • 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