Skip to content

Instantly share code, notes, and snippets.

@nikushi
Created November 5, 2013 14:24
Show Gist options
  • Save nikushi/7319772 to your computer and use it in GitHub Desktop.
Save nikushi/7319772 to your computer and use it in GitHub Desktop.
redis関連メモ

インストール

amazon aimなら

sudo yum --enablerepo=epel install redis

2.4.10がインストールされる

起動

# /etc/init.d/redis start

設定

チューニングポイント

tcp vs unix socket

http://redis.io/topics/benchmarks

When the server and client benchmark programs run on the same box, both the TCP/IP loopback and unix domain sockets can be used. It depends on the platform, but unix domain sockets can achieve around 50% more throughput than the TCP/IP loopback (on Linux for instance). The default behavior of redis-benchmark is to use the TCP/IP loopback.

同一boxであればunix socketの方がパフォーマンス良い

on memory storage

saveから始まる行を全てコメントアウトすると自動的なdisk書き込みをやめる

#save 900 1
#save 300 10
#save 60 10000

appendonly no

クラッシュ時に1データでも欠けてはいけない場合を除いて、appendonly noでよい

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment