2014-01-27 60 views
1

我正在嘗試查找REDIS可以容納的鍵數。我修復了REDIS 1471472字節的最大內存並存儲了固定大小的鍵/值對。有時它可以容納19個按鍵並且有時21.編號鍵/值對在REDIS中有所不同

19個鍵

的情況下由每對取存儲器
1)18016 bytes 
2)17984 bytes 
3)17984 bytes 
4)17984 bytes 
5)52864 bytes 
6)17952 bytes 
7)17984 bytes 
8)17984 bytes 
9)18112 bytes 
10)17984 bytes 
11)17920 bytes 
12)17984 bytes 
13)17984 bytes 
14)17984 bytes 
15)17984 bytes 
16)17984 bytes 
17)18240 bytes 
18)17984 bytes 
19)17984 bytes 

使用的總存儲器=由每對19箇中的密鑰的情況下采取1459104

存儲器

1)18016 bytes 
2)17984 bytes 
3)17984 bytes 
4)17984 bytes 
5)18048 bytes 
6)17952 bytes 
7)17984 bytes 
8)17984 bytes 
9)18112 bytes 
10)17984 bytes 
11)17920 bytes 
12)17984 bytes 
13)17984 bytes 
14)17984 bytes 
15)17984 bytes 
16)17984 bytes 
17)18240 bytes 
18)17984 bytes 
19)17984 bytes 
20)17984 bytes 
21)17856 bytes 

總存儲器使用= 1460128

回答

0

它僅用1.4 MB的內存對Redis進行基準測試毫無意義。你不能推斷這些數字。您最終將存儲的數據不會是固定大小的鍵值對。

確定您想要存儲的內容,確定您將擁有的可用內存,然後運行真實的測試。這是確定Redis是否滿足您的需求的唯一方法。

相關問題