2019年8月1日木曜日

Amazon Linuxでredisをインストール、操作に関するメモ

Amazon Linuxでredisをインストール、操作に関するメモ

まず、インストール

# amazon-linux-extras install redis4.0

次にredisに接続する

# redis-cli -h エンドポイント -p ポート番号

メモリの使用率が気になるので、メモリの容量などを確認する

以下のコマンドをうつっと、たくさんの情報が出てきました。そのうち # Memoryの部分は今回がみたい情報
# info
# Memory
used_memory:25368088
used_memory_human:24.19M
used_memory_rss:45121536
used_memory_rss_human:43.03M
used_memory_peak:40919128
used_memory_peak_human:39.02M
used_memory_peak_perc:62.00%
used_memory_overhead:19204566
used_memory_startup:3668896
used_memory_dataset:6163522
used_memory_dataset_perc:28.40%
allocator_allocated:25576096
allocator_active:41369600
allocator_resident:44400640
used_memory_lua:37888
used_memory_lua_human:37.00K
used_memory_scripts:0
used_memory_scripts_human:0B
number_of_cached_scripts:0
maxmemory:1248854016
maxmemory_human:1.16G
maxmemory_policy:volatile-lru
allocator_frag_ratio:1.62
allocator_frag_bytes:15793504
allocator_rss_ratio:1.07
allocator_rss_bytes:3031040
rss_overhead_ratio:1.02
rss_overhead_bytes:720896
mem_fragmentation_ratio:1.78
mem_fragmentation_bytes:19795320
mem_not_counted_for_evict:0
mem_replication_backlog:1048576
mem_clients_slaves:0
mem_clients_normal:117942
mem_aof_buffer:0
mem_allocator:jemalloc-5.1.0
active_defrag_running:0
lazyfree_pending_objects:0
上記の情報をみると、総容量1.16Gのうち、現に24.19Mが使われている。ピーク時に62%が使われた。
maxmemory_human:総容量
used_memory_human:現在の使用量
used_memory_peak_human:ピーク時に使用量

0 件のコメント:

コメントを投稿