README.md 4.2 KB
Newer Older
K
KernelMaker 已提交
1
#Pika
B
baotiao 已提交
2

B
baotiao 已提交
3 4
[![Build Status](https://travis-ci.org/Qihoo360/pika.svg?branch=master)](https://travis-ci.org/Qihoo360/pika)

S
SongZhao 已提交
5
##Introduction [中文] (https://github.com/Qihoo360/pika/blob/master/README_CN.md)
K
KernelMaker 已提交
6

S
SongZhao 已提交
7
Pika is a persistent huge storage service , compatible  with the vast majority of redis interfaces ([details](https://github.com/Qihoo360/pika/wiki/pika-支持的redis接口及兼容情况)), including string, hash, list, zset, set and management interfaces. With the huge amount of data stored, redis may suffer for a capacity bottleneck, and pika was born for solving it. Except huge storage capacity, pika also support master-slave mode by slaveof command, including full and partial synchronization
K
KernelMaker 已提交
8 9 10 11 12 13

##Feature

* huge storage capacity
* compatible with redis interface, you can migrate to pika easily
* support master-slave mode (slaveof)
S
SongZhao 已提交
14
* various [management](https://github.com/Qihoo360/pika/wiki/pika的一些管理命令方式说明) interfaces
K
KernelMaker 已提交
15

B
baotiao 已提交
16 17 18 19 20 21 22 23 24 25 26 27 28 29

## Quickstart and Try
  You can try to use our pre-build binary versions. For now, only Centos5 and Centos6 are supported. The binary ones can be found at [the release page](https://github.com/Qihoo360/pika/releases) which are called pikaX.Y.Z_centosK_bin.tar.gz.

```
# 1. unzip file
tar zxf pikaX.Y.Z_centosK_bin.tar.gz
# 2. change working directory to output
#     note: we should in this directory, caz the RPATH is ./lib;
cd output
# 3. run pika:
./bin/pika -c conf/pika.conf
```

K
KernelMaker 已提交
30
##Install
Z
Zongzhi Chen 已提交
31

32 33 34
1.Install snappy-devel bz2 libzip-dev libsnappy-dev libprotobuf-dev libevent-dev protobuf-compiler libgoogle-glog-dev protobuf-devel libevent-devel bzip2-devel libbz2-dev zlib-devel etc on you compiling host(if alreadly installed, ignore it); using "yum install" on centos system("apt-get install" on ubuntu system) is ok. If on CentOS system, run the following commands:
   
~~~
J
JacketWoo 已提交
35
	 yum install snappy-devel bz2 libzip-dev libsnappy-dev libprotobuf-dev libevent-dev protobuf-compiler libgoogle-glog-dev protobuf-devel libevent-devel bzip2-devel libbz2-dev zlib-devel
36 37 38 39 40 41 42 43 44 45 46
~~~
2.Install g++(if installed, skip). Similarly, just using "yum install" on the CentOS(apt-get on Ubuntu) is ok:
 
~~~
	yum install gcc-c++
~~~
3.If your gcc's version is below 4.7, then change it to the 4.7 temporary. For CentOS system, run the flowing commands:

~~~  
	a. sudo wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
	b. yum install --nogpgcheck devtoolset-1.1
J
JacketWoo 已提交
47
	c. scl enable devtoolset-1.1 bash
48 49 50 51
~~~
4.Fetch the source code: 

~~~
S
SongZhao 已提交
52
	a. git clone git@github.com:Qihoo360/pika
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
	b. cd pika
~~~

5.Get the third party dependencies:

~~~ 
	a. git submodule init
	b. git submodule update
~~~
6.Compile: 

~~~
	make __REL=1
~~~
If it comes to some missing libs, install them according to the prompts and retry it.
B
baotiao 已提交
68

K
KernelMaker 已提交
69 70
##Usage

71 72 73 74 75 76
~~~
	./output/bin/pika -c ./conf/pika.conf
~~~
If failed, move pika source/lib/_VERSION/lib/ to the rpath defined in Makefile and relanch. 

~~~
W
wuxiaofei-xy 已提交
77
	cp PIKA_SOURCE/lib/_VERSION/* RPATH
78 79 80 81
~~~
The PIKA_SOURCE stands for pika source code's root directory;  
The __VERSION represents the OS's version, such as 6.2, 5.4...  
The RPATH is defined in pika's Makefile
B
baotiao 已提交
82

Z
zhaoanan 已提交
83

K
KernelMaker 已提交
84 85
##Performance

K
KernelMaker 已提交
86
```
K
KernelMaker 已提交
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Server Info:
	CPU: 24 Cores, Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
	MEM: 165157944 kB
	OS: CentOS release 6.2 (Final)
	NETWORK CARD: Intel Corporation I350 Gigabit Network Connection
Client Info:
	Same as Server

Test:
	Pika run with 18 worker threads, and we test it using 40 client;
	1. Write Performance:
		Client push data by set, hset, lpush, zadd, sadd, each interface has 10000 key range;
		result: 110000 qps
	2. Read Performance:
		Client pull data by get, hget, lindex, zscore, smembers, 25000000 keys stored in pika and each interface has 5000000 key range
		result: 170000 qps

S
SongZhao 已提交
104 105 106 107 108 109 110 111 112 113 114 115
```

##UserList

<img src="http://i.imgur.com/dcHpCm4.png" height = "100" width = "120" alt="Qihoo">
<img src="http://i.imgur.com/jjZczkN.png" height = "100" width = "120" alt="Weibo">
<img src="http://i.imgur.com/kHqACbn.png" height = "100" width = "120" alt="Apus">
<img src="http://i.imgur.com/2c57z8U.png" height = "100" width = "120" alt="Ffan">

[More](https://github.com/Qihoo360/pika/blob/master/USERS.md)

 
K
KernelMaker 已提交
116 117
##Documents

S
SongZhao 已提交
118
1. [Wiki](https://github.com/Qihoo360/pika/wiki)
K
KernelMaker 已提交
119 120

##Contact Us
B
baotiao 已提交
121

B
baotiao 已提交
122
Mail: g-infra-bada@360.cn
S
SongZhao 已提交
123

B
baotiao 已提交
124
QQ group: 294254078