Redis and memcache do not have much difference in write performance, read performance above especially bulk read performance above Memcache fully wins, of course, Redis also has its own advantages: such as data persistence, support more structure (Set List zset), etc.
Redis and Memcache, the test server is a personal PC: Configure general (2CPU\2G memory), OS-installed CentOS.
1, Redis memcache are empty time
- Redis set 100,000 value start time: 1311742106
- Redis Settings 100,000 Value time: 1311742123 Duration: 16.8817
- Memcache setting 100,000 values start time: 1311742123
- Memcache set 100,000 value End time: 1311742138 Duration: 15.2574
2. When Redis and memcache have data:
- Redis set 100,000 value start time: 1311742721
- Redis Settings 100,000 Value time: 1311742738 Duration: 17.3401
- Memcache setting 100,000 values start time: 1311742738
- Memcache set 100,000 value End time: 1311742753 Duration: 15.6892
3. Test Redis and memcache to get data speed separately:
- Redis array get 100,000 values start time: 1311742144
- Redis array Get 100,000 Values time: 1311742398 Duration: 253.9285
- Redis gets 100,000 values from one value start time: 1311742398
- Redis gets 100,000 values on a time: 1311742414 Duration: 16.339
- Memcache Array gets 100,000 values start time: 1311742414
- Memcache array get 100,000 values End time: 1311742415 Duration: 0.8022
- Memcache get 100,000 values one time start: 1311742415
- Memcache 100,000 value-by-one end time: 1311742428 time: 13.38
On the above test results, Redis and memcache in the write performance above the difference, read performance above especially bulk read performance above Memcache fully wins, of course, Redis also has its own advantages: such as data persistence, support more structure (Set List zset) and so on.
Redis and memcache performance test comparison