News for hackers. Stuff that matters.
Re:Ways to shoot yourself in the foot with Redis by jontonsoup on Saturday July 29, 2023 @03:51PM (#36923888)
Has anyone seen max (p100) client latencies of 300 to 400ms but totally normal p99? We see this across almost all our redis clusters on elasticache and have no idea why. CPU usage is tiny. Slowlog shows nothing.
Re:Ways to shoot yourself in the foot with Redis by GauntletWizard on Saturday July 29, 2023 @04:30PM (#36924232)
I would guess your problem is probably scheduler based. The default(ish) Linux scheduler operates in 100ms increments, the first use of a client takes 3-4 round-trips. TCP opens, block, request is sent, the client blocks on write, the client attempts to read and blocks on read. If CPU usage is high momentarily, each of these yields to another process and your client isn't scheduled for another 100ms
Re:Ways to shoot yourself in the foot with Redis by jontonsoup on Saturday July 29, 2023 @05:47PM (#36925016)
Hmm. We have super low CPU utilization- something like 9%. This is also across 10+ different clusters.
Re:Ways to shoot yourself in the foot with Redis by jontonsoup on Saturday July 29, 2023 @06:05PM (#36925182)
We also pool our clients heavily. Maybe we could reduce the new connections to zero to test.
Re:Ways to shoot yourself in the foot with Redis by secondcoming on Saturday July 29, 2023 @04:24PM (#36924184)
Is it doing backups?
Re:Ways to shoot yourself in the foot with Redis by jontonsoup on Saturday July 29, 2023 @04:34PM (#36924270)
My understanding is elasticache does not let you turn them off.
Re:Ways to shoot yourself in the foot with Redis by secondcoming on Saturday July 29, 2023 @07:20PM (#36925870)
That would be surprising, have you tried with CONFIG SET xyz ?
Re:Ways to shoot yourself in the foot with Redis by jontonsoup on Saturday July 29, 2023 @09:19PM (#36926700)
Running from the client side says that the config command doesn’t exist. Not sure how to run from the server side on elasticache.
Re:Ways to shoot yourself in the foot with Redis by tayo42 on Saturday July 29, 2023 @09:31PM (#36926793)
Is the memory full and evicting? Or do you have a large db with lots of keys with ttls? Redis does a bunch of maintenance stuff on the same thread iirc in the background but not really
Re:Ways to shoot yourself in the foot with Redis by jontonsoup on Saturday July 29, 2023 @11:05PM (#36927403)
Memory is maybe 50% full. We are totally over provisioned. We actually just downsized and it didn’t impact anything.

We do expire but we don’t think we have a thundering herd problem with them all happening at the same time.

Re:Ways to shoot yourself in the foot with Redis by nicwolff on Monday July 31, 2023 @03:34PM (#36947648)
Are you evicting or deleting large sets (or lists or sorted sets)? We use a Django ORM caching library that adds each resultset's cache key to a set of keys to invalidate when that table is updated – at which point it issues `DEL <set key>` and if that set has grown to hundreds of thousands – or millions! – of keys the main Redis process will block completely for as long as it takes to loop through and evict them.
Re:Ways to shoot yourself in the foot with Redis by jontonsoup on Friday August 11, 2023 @06:44PM (#37094946)
nope!