" maxmemory "although the RDB file after saving is only 3GB The red...">

Redis MSOpenTech: Maximum Memory "OOM command not allowed when using memory>" maxmemory "although the RDB file after saving is only 3GB

The redis server version I am using is 2.8.9 from MSOpenTech github. Can anyone shed some light on why the redis "info" command indicates that the memory used is 21 GB even though the RDB file that is saved on disk is less than 4 GB? I successfully ran the "save" command before specifying the size of the RDB file. The heffile qfork is 30 GB because it was configured in redis.windows.conf.

Configuration:

maxheap 30gb max-memory 20 Gb appendonly no save 18000 1

The server has 192 GB of physical memory, but unfortunately we only have about 60 GB of free disk space and I had to set the max and max memory to 30 GB and 20 GB respectively so that I had extra space to save the data on disk.

I am using redis as my cache and the save interval is long as it takes a long time to seed the data and I don't want to keep writing to the file all the time. After sowing, the database is updated with newer data once a day.

My questions:

  • How is the saved RDB file so small? Is it just because of compression (rdbcompression yes)? If so, can the same compression mechanism be used to store data in memory? I use lists extensively.

  • Before I ran the "save" command, the working set and private bytes in Process Explorer were very small. Is there a way that I can use datastructure memory breakdown? For example: List uses x amount, Hash uses y amount, etc.

  • Is there a way to save the AOF file (I disabled AOF and used RDB because AOF files were filling up disk space quickly) on a network path (shared drive or NAS)? I tried to set the dir config to the \ someip \ some folder, but the service failed to start with the message "Cant CHDIR to location"

I can't post images, but this is what the process handler has to say about the redis server instance:

  • Virtual memory:

    • Private Bytes: 72,920K
    • Peak Private Bytes: 31,546,092 K
    • Virtual size: 31 558 356 K
    • Page errors: 12,479,550
  • Physical memory:

    • Working set: 26,871,240K
    • WS Private: 63.260 K
    • WS Shared use: 26 807 980 K
    • WS Shared: 3,580 K
    • Peak working set: 27 011 488 K

The last saved dump.rdb file is 3.81 GB and the heap file is 30 GB.

# Server
redis_version:2.8.9
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:1fe181ad2447fe38
redis_mode:standalone
os:Windows  
arch_bits:64
multiplexing_api:winsock_IOCP
gcc_version:0.0.0
process_id:12772
run_id:553f2b4665edd206e632b7040aa76c0b76083f4d
tcp_port:6379
uptime_in_seconds:24087
uptime_in_days:0
hz:50
lru_clock:14825512
config_file:D:\RedisService/redis.windows.conf

# Clients
connected_clients:2
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:21484921736
used_memory_human:20.01G
used_memory_rss:21484870536
used_memory_peak:21487283360
used_memory_peak_human:20.01G
used_memory_lua:3156992
mem_fragmentation_ratio:1.00
mem_allocator:dlmalloc-2.8

# Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1407328559
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:1407328560
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

# Stats
total_connections_received:9486
total_commands_processed:241141370
instantaneous_ops_per_sec:0
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:30143
keyspace_misses:81
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:1341134

      

+3


source to share





All Articles