Time of Update: 2015-10-13
標籤:A)編譯安裝makemake install (/usr/local)make install PREFIX=$HOME/progs(可以自由指定安裝路徑)B)同步的API介面redisContext *redisConnect(const char *ip, int port);void *redisCommand(redisContext *c, const char *format, ...);void freeReplyObject(void
Time of Update: 2015-09-17
標籤:傳統MySQL+
Time of Update: 2015-09-22
標籤:redis redis_windwos安裝 windowssession問題 kv-redis windwos2008搭建redis redis windows下的環境搭建 Redis是一個key-value儲存系統。和Memcached類似,
Time of Update: 2015-10-16
標籤:【Redis 基礎操作】1、ECHO message。 Returns message. 2、PHING Returns PONG if no argument is provided, otherwise return a copy of the argument as a bulk. This command is often used to test if a connection is still alive, or to
Time of Update: 2015-10-15
標籤:redis最佳化配置和redis.conf說明時間 2014-10-29 01:01:30 CSDN部落格原文 http://blog.csdn.net/luozhonghua2014/article/details/40568707主題 Redis1. redis.conf 配置參數:#是否作為守護進程運行daemonize yes#如以後台進程運行,則需指定一個pid,預設為/var/run/redis.pidpidfile redis.pid#綁定主機IP,預設值為127.0.0
Time of Update: 2015-10-15
標籤:關閉和啟動Redis關閉redis進程 ./redis-cli -a 密碼 shutdown啟動redis進程 ./redis-server redis.conf重啟redis進程 按照關閉和啟動的順序執行上面2個命令大量刪除某些key ./redis-cli -a 密碼 keys "id_*"|xargs ./redis-cli -a 密碼
Time of Update: 2015-10-13
標籤: 在Redis中,我們可以將Set類型看作為沒有排序的字元集合,和List類型一樣,我們也可以在該類型的資料值上執行添加、刪除或判斷某一元素是否存在等操作。需要說明的是,這些操作的時間複雜度為O(1),即常量時間內完成次操作。Set可包含的最大元素數量是4294967295。 和List類型不同的是,Set集合中不允許出現重複的元素,這一點和C++標準庫中的set容器是完全相同的。
Time of Update: 2015-10-05
標籤:redis使用sds代替char *字串,其定義如下:typedef char *sds;struct sdshdr { unsigned int len; unsigned int free; char buf[];};sds指向了char 字串 sdshdr是字串頭結構比較巧妙使用char buf[]存放字串實際內容注意char *buf和char buf[]是不同的sizeof(sdshdr)等於8,而不是我以為的12連續記憶體結構如下: 0--
Time of Update: 2015-10-04
標籤:一、下載、編譯redis是以源碼方式發行的,先下載源碼,然後在linux下編譯1.1 http://www.redis.io/download 先到這裡下載Stable穩定版,目前最新版本是2.8.171.2 上傳到linux,然後運行以下命令解壓tar xzf redis-2.8.17.tar.gz1.3 編譯cd redis-2.8.17make註:make命令需要linux上安裝gcc,若機器上未安裝gcc,redhat環境下,如果能連網,可鍵入yum
Time of Update: 2015-09-30
標籤: Lua 到 Redis 的轉換表。Lua number -> Redis integer reply (the number is converted into an integer)Lua string -> Redis bulk replyLua table (array) -> Redis multi bulk reply (truncated to the first nil inside the Lua array if any)Lua table
Time of Update: 2015-09-29
標籤:最近的研究已redis原始碼,redis高效率是令人欽佩。在我們的linux那個機器,cpu型號, Intel(R) Pentium(R) CPU G630 @ 2.70GHz Intel(R) Pentium(R) CPU G630 @ 2.70GHz上 set,get
Time of Update: 2015-09-28
標籤:redisxml代碼:[[email protected] src]# wget -c http://redis.googlecode.com/files/redis-2.4.7.tar.gz [[email protected] src]# tar -zxv -f redis-2.4.7.tar.gz [[email
Time of Update: 2015-09-25
標籤: I/O每個作業系統,它的一個組成部分。和I/O業務品質,在一定程度上也影響了系統的效率。今天,我在瞭解了Redis中間I/O的,相同的,Redis在他自己的系統中。也封裝了一個I/O層。簡稱RIO。得先看看RIO中有什麼東西嘍:struct _rio { /* Backend functions. * Since this functions do not tolerate short writes or reads
Time of Update: 2015-09-25
標籤:編譯使用初始化串連redis資料庫redisContext * pConn = redisConnect(redisIp.c_str(), redisPort);if (m_cLocal == NULL){return 1;}if(pConn->err){cout << "Connection to redis[" << redisIp << "] error: " << pConn->errstr;redisFree(
Time of Update: 2015-09-23
標籤:Redis安裝: Windows安裝包:http://pan.baidu.com/s/1i3jLlC5 下載下來之後,開始安裝: Redis-server.exe redis.conf: 簡單一步,安裝成功,保持這個Windows持續運行~ 查看一下我們原生連接埠,可以看到多了一個6379連接埠,安全風險來了,記得設定redis的密碼~ 接下來,開始利用redis-cli.exe來進行遠程redis的入侵:
Time of Update: 2015-09-22
標籤:參考資料 linux 虛擬機器 訪問量 用戶端 網站的訪問量慢慢上來了。為了網站的效能方面,開始用了redis做緩衝策略。剛開始的時候,redis是一個單點,當一台機器岩機的時候,redis的 服務完全停止,這時就會影響其他服務的正常運行。費話不多說了,下面利用redis
Time of Update: 2015-09-21
標籤:環境資訊: CentOS 6.5 redis 3.0.4 logstash elasticsearch kibana 服務端ip:192.168.0.65 用戶端ip:192.168.0.66 關係結構圖: 圖片引用自:http://www.wklken.me/posts/2015/04/26/elk-for-nginx-log.html 安裝redis 首先下載redis wget
Time of Update: 2015-09-21
標籤:redis是個對記憶體依賴性很強的NoSql資料庫,在記憶體足夠的情況下效能出色如果只有一台機子去部署redis,一定要特別小心。比如我有台24G的伺服器,理所當然我會將大量記憶體配置給redis。比如20G的記憶體, 問題來了, 當你對redis插入資料後,redis會非同步將資料dump到硬碟中想起來很完美,問題是它會fork一個進程,並佔去同樣大小的記憶體,你需要的記憶體瞬間便為 20G+20G
Time of Update: 2015-09-16
標籤:轉載自http://blog.csdn.net/jiangguilong2000/article/details/24143721Redis-benchmark為Redis效能測試工具。指令說明: Usage: redis-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests]&
Time of Update: 2015-09-16
標籤:redis redis安裝 使用版本為:redis-3.0.4 http://www.redis.io/ 按順序執行以下指令 tar -xzvf