Re: Fixed time every day, redis server load suddenly high.

158 views
Skip to first unread message

Greg Andrews

unread,
Jun 27, 2012, 9:23:36 PM6/27/12
to redi...@googlegroups.com
What is the size of your master's AOF file just before and just after the high server load?

The reason I ask is your master-redis.conf file has these two lines:

    auto-aof-rewrite-percentage 100
    auto-aof-rewrite-min-size 1024mb

I have an older version of Redis so I'm not familiar with those parameters.  Reading the comments explaining them, it looks like your master server's AOF file will be rewritten when it reaches 1GB (1024mb).  If your write activity is steady, the file might be reaching 1GB (and triggering a rewrite) at the same time each day.

  -Greg

On Tue, Jun 26, 2012 at 8:33 PM, PanosZhu <tjzh...@gmail.com> wrote:
Fixed time every day, redis server load suddenly high, lasting about five minutes

One master red is server and two slave redis server both occurs this phenomenon

There are no any timing tasks.

Master just only use AOF persistence, and slave did not use any data persistence strategy. Master redis config and slave redis config in the attachment.

There are server load picture.

Master-redis-server-load

Slave-redis-server-load

Any idea? Thanks beforehand for your help.

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To view this discussion on the web visit https://groups.google.com/d/msg/redis-db/-/tZA5vOyYe6AJ.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.

PanosZhu

unread,
Jun 27, 2012, 9:51:32 PM6/27/12
to redi...@googlegroups.com
Hi Greg,

My master's AOF is 4G,Master daily amount of modification will not exceed 1024mb. However, this overload is a daily 10:00 occurred.So,I think this is not cause by BGREWRITEAOF.

My master redis version is 2.4.4 and slave redis version is 2.4.14.  

Best Regards!  

Panos 

在 2012年6月28日星期四UTC+8上午9时23分36秒,GregA写道:
To unsubscribe from this group, send email to redis-db+unsubscribe@googlegroups.com.

Josiah Carlson

unread,
Jun 28, 2012, 12:02:36 AM6/28/12
to redi...@googlegroups.com
What does top, htop, and/or iostat produce during those times?

 - Josiah

To view this discussion on the web visit https://groups.google.com/d/msg/redis-db/-/awYMscl-mmcJ.

To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.

Aleksandar Radulovic

unread,
Jun 28, 2012, 6:52:10 AM6/28/12
to redi...@googlegroups.com
Hi there,

On Wed, Jun 27, 2012 at 5:33 AM, PanosZhu <tjzh...@gmail.com> wrote:
Fixed time every day, redis server load suddenly high, lasting about five minutes


Do you by any chance have a crontab job at that time? Do you have network activity graphs that show similar spikes?

Cheers,
alex
--
a lex 13 x
http://a13x.net | @a13xnet

PanosZhu

unread,
Jun 28, 2012, 10:21:15 PM6/28/12
to redi...@googlegroups.com
Hi all,

I found the Master every day in 22:04 will rewrite the dump.rdb file.

I view the redis source code found that Master will rewrite dump.rdb file when the salve first sync or reconnect to master. But what would lead to the slave disconnected and reconnect  to master every day 22:00 ?

Best Regards!  
Panos

在 2012年6月28日星期四UTC+8下午6时52分10秒,Aleksandar Radulovic写道:

Greg Andrews

unread,
Jun 28, 2012, 11:51:35 PM6/28/12
to redi...@googlegroups.com
PanosZhu wrote:
But what would lead to the slave disconnected and reconnect  to master every day 22:00 ?

There can be lots of reasons.  The master's logfile should show you which slave is connecting and causing the file i/o activity.  Once you know that, you can look in the slave's logfile for more information.

Your long-running slaves might lose their connections to the master at 22:00.  Or some other cron job might be attaching a slave to perform backups.  We can't really know.

The logfile for the master and the logfiles for the slaves should give you the best hints about what is happening.

  -Greg

PanosZhu

unread,
Jun 29, 2012, 12:28:34 AM6/29/12
to redi...@googlegroups.com
Hi Greg,

Thank you very much.

I think I found the reason.Master on 10:00 have a BGREWRITEAOF timing task, BGREWRITEAOF will rewrite the aof file and the dump file.

Thank everyone.

Best regards,
Panos

在 2012年6月29日星期五UTC+8上午11时51分35秒,GregA写道:

Greg Andrews

unread,
Jun 29, 2012, 12:42:58 AM6/29/12
to redi...@googlegroups.com
I don't see any configuration like that in the master-redis.conf file you posted.  Is it a cron job that connects to the master and issues a bgrewriteaof command?

  -Greg

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To view this discussion on the web visit https://groups.google.com/d/msg/redis-db/-/F1Vhg9ishVoJ.

PanosZhu

unread,
Jun 29, 2012, 4:22:36 AM6/29/12
to redi...@googlegroups.com
Hi Greg,

I have a shell cron job, the command is ./server-cli BGREWRITEAOF.

But, why BGREWRITEAOF will rewrite dump file?

在 2012年6月29日星期五UTC+8下午12时42分58秒,GregA写道:
To unsubscribe from this group, send email to redis-db+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages