-
-
Save antirez/1559882 to your computer and use it in GitHub Desktop.
redis 127.0.0.1:6379> debug populate 5000000 | |
OK | |
(5.14s) | |
redis 127.0.0.1:6379> save | |
OK | |
(2.08s) |
more or less the time it takes in the same box with a non SSD disk: 4.2 seconds.
Basically Redis is particularly good with rotating disks because it writes sequentially, so the only difference is about the transfer but we don't use any seeking around. Now one thing I want to try that uses seeking (a lot) is dataset bigger than RAM using the OS paging, in many ways (the simples is to set a large swap partition in the SSD disk).
redis 127.0.0.1:6379> debug populate 5000000
OK
(6.70s)
redis 127.0.0.1:6379> debug populate 5000000
OK
(2.83s)
redis 127.0.0.1:6379> debug populate 5000000
OK
(2.91s)
redis 127.0.0.1:6379> save
OK
(2.70s)
Macbook Pro, 2 Ghz i7, OCZ-VERTEX3
redis 127.0.0.1:6379> debug populate 5000000
OK
(4.65s)
redis 127.0.0.1:6379> save
OK
(3.71s)
redis 127.0.0.1:6379> debug populate 5000000
OK
(1.61s)
redis 127.0.0.1:6379> save
OK
(3.40s)
redis 127.0.0.1:6379>
AMD X2 240 - 2x3750Mhz (265FSB)
DDR3 ~1400Mhz single ch.
WD 7200k blue
It seems Mhz are the most important for populate. So raw 70% more frequency gives 40-50% faster time. Is the diff in efficiency from the CPU cache ?
redis 127.0.0.1:6379> debug populate 5000000
OK
(5.19s)
redis 127.0.0.1:6379> save
OK
(2.10s)
2.7 Ghz i5
16 GB RAM
Western Digital Caviar Black WD1001FALS 1TB 7200 RPM 32MB Cache SATA 3.0Gb/s 3.5"
Model Name: MacBook Pro
Processor Name: Intel Core i7
Processor Speed: 2.66 GHz
SATA ST9500420AS