Raj yadav
Raj yadav

Reputation: 43

AOF file size greater than memory allocated to redis nodes

AOF file size greater than memory allocated to redis nodes.

I have redis nodes with 16Gi each but aof file size is going greater than 16Gi and has reached 24Gi.

Is aof file journey of all the keys ? I am adding keys processing it and deleting it and adding new keys. So will aof keep sync of all the deleted keys as well ?

Upvotes: 2

Views: 2440

Answers (1)

slorello
slorello

Reputation: 1149

It should be fine

The answer to your fundamental question is that the AoF file exceeding the size of your redis instance is not something that should overly concern you.The AoF file is a record of all the commands that have been executed against redis up to the current point. The purpose of the AoF file is to allow you to re-run all the commands to put redis back into its current state, so the fact that it's grown larger than the database is not a concern, when the AoF file is run all the way through your Redis instance will be exactly as large as it currently is.

You Might want to have a think on AOF rewrites

That said, it may be worth looking into how AOF rewrites are operating on your redis instance. Redis can rewrite the AoF file periodically to make it smaller and more efficient in case of a disaster.

Couple points

  1. if you are running Redis 2.2 or less, you will want to from time to time call BGAOFREWRITE to keep the size of the AOF file under control.
  2. If you are on a more modern version of Redis, you might want to take a look at the re-write config settings in your redis.conf file - see the aof config settings in redis.conf e.g. auto-aof-rewrite-percentage and auto-aof-rewrite-min-size

Upvotes: 4

Related Questions