mirror of
https://github.com/fluencelabs/redis
synced 2025-06-12 16:51:22 +00:00
Changed reply buildup internals
This commit is contained in:
11
src/redis.h
11
src/redis.h
@ -47,15 +47,7 @@
|
||||
#define REDIS_MAX_WRITE_PER_EVENT (1024*64)
|
||||
#define REDIS_REQUEST_MAX_SIZE (1024*1024*256) /* max bytes in inline command */
|
||||
#define REDIS_SHARED_INTEGERS 10000
|
||||
|
||||
/* Size of a reply chunk, configured to exactly allocate 4k bytes */
|
||||
#define REDIS_REPLY_CHUNK_BYTES (4*1024)
|
||||
#define REDIS_REPLY_CHUNK_SIZE (REDIS_REPLY_CHUNK_BYTES-sizeof(struct sdshdr)-1-sizeof(size_t))
|
||||
/* It doesn't make sense to memcpy objects to a chunk when the net result is
|
||||
* not being able to glue other objects. We want to make sure it can be glued
|
||||
* to at least a bulk length or \r\n, so set the threshold to be a couple
|
||||
* of bytes less than the size of the buffer. */
|
||||
#define REDIS_REPLY_CHUNK_THRESHOLD (REDIS_REPLY_CHUNK_SIZE-16)
|
||||
#define REDIS_REPLY_CHUNK_BYTES (5*1500) /* 5 TCP packets with default MTU */
|
||||
|
||||
/* If more then REDIS_WRITEV_THRESHOLD write packets are pending use writev */
|
||||
#define REDIS_WRITEV_THRESHOLD 3
|
||||
@ -81,7 +73,6 @@
|
||||
#define REDIS_SET 2
|
||||
#define REDIS_ZSET 3
|
||||
#define REDIS_HASH 4
|
||||
#define REDIS_REPLY_NODE 5
|
||||
#define REDIS_VMPOINTER 8
|
||||
|
||||
/* Objects encoding. Some kind of objects like Strings and Hashes can be
|
||||
|
Reference in New Issue
Block a user