allenylzhou
allenylzhou

Reputation: 1461

Redis CPU spike

The problem is described and answered here: https://groups.google.com/forum/#!topic/redis-db/egyA1xvhGfo

Unfortunately I do not fully understand the answer.

My concerns are if redis takes up 100% CPU every 5 minutes and if my server only has a single CPU (i.e. staging) would that mean it will freeze my httpd process every 5 minutes?

Would this not be of a concern if my server has multiple CPUs?

Upvotes: 1

Views: 1458

Answers (1)

Wedge Martin
Wedge Martin

Reputation: 825

Depending on the type of persistence you select, this will happen. The reason is because the standard persist method ( fork and copy-on-write aka cow ) happens after x number of object changes ( or however you have it configured ) and will eat up a fair amount of I/O persisting the database to disk. You'll want at least a spare core on your server for the persistence to happen but it's not so much actual CPU that's being utilized as it is the wait for the I/O. Faster I/O will mitigate the impact of the db saves.

Upvotes: 1

Related Questions