Code Monkey home page Code Monkey logo

pika's Introduction

#Pika

##Introduction [中文] (https://github.com/Qihoo360/pika/blob/master/README_CN.md)

Pika is a persistent huge storage service , compatible with the vast majority of redis interfaces (details), 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

##Feature

  • huge storage capacity
  • compatible with redis interface, you can migrate to pika easily
  • support master-slave mode (slaveof)
  • various management interfaces

##Install

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:

	 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

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
	c. scl enable devtoolset-1.1 bash

4.Fetch the source code:

	a. git clone [email protected]:Qihoo360/pika
	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.

##Usage

	./output/bin/pika -c ./conf/pika.conf

If failed, move pika source/lib/_VERSION/lib/ to the rpath defined in Makefile and relanch.

	cp PIKA_SOURCE/lib/_VERSION/* RPATH

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

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 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

##Performance

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

##Documents

  1. Wiki

##Contact Us

Mail: [email protected]

QQ group: 294254078

pika's People

Contributors

kernelmaker avatar flabby avatar catkang avatar jacketwoo avatar baotiao avatar jackdrogon avatar gitter-badger avatar songbingyu avatar

Watchers

James Cloos avatar DS avatar 时易创享 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.