warning overcommit_memory is set to 0! background save may fail under low memory condition. to fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
时间: 2023-04-15 14:03:10 浏览: 325
警告:overcommit_memory被设置为!在内存不足的情况下,后台保存可能会失败。为了解决这个问题,请将“vm.overcommit_memory = 1”添加到/etc/sysctl.conf中,然后重新启动或运行命令“sysctl vm.overcommit_memory = 1”使其生效。
相关问题
WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
这是一个系统警告,意味着内存不足可能会导致后台保存失败。为了解决这个问题,需要将'vm.overcommit_memory = 1'添加到/etc/sysctl.conf中,然后重新启动或运行命令'sysctl vm.overcommit_memory=1'。
vm.admin_reserve_kbytes = 8192 vm.block_dump = 0 vm.compact_unevictable_allowed = 1 vm.dirty_background_bytes = 0 vm.dirty_background_ratio = 10 vm.dirty_bytes = 0 vm.dirty_expire_centisecs = 3000 vm.dirty_ratio = 20 vm.dirty_writeback_centisecs = 500 vm.dirtytime_expire_seconds = 43200 vm.drop_caches = 3 vm.extfrag_threshold = 500 vm.hugepages_treat_as_movable = 0 vm.hugetlb_shm_group = 0 vm.laptop_mode = 0 vm.legacy_va_layout = 0 vm.lowmem_reserve_ratio = 256 256 32 1 vm.max_map_count = 65530 vm.memory_failure_early_kill = 0 vm.memory_failure_recovery = 1 vm.min_free_kbytes = 67584 vm.min_slab_ratio = 5 vm.min_unmapped_ratio = 1 vm.mmap_min_addr = 65536 vm.mmap_rnd_bits = 28 vm.mmap_rnd_compat_bits = 8 vm.nr_hugepages = 0 vm.nr_hugepages_mempolicy = 0 vm.nr_overcommit_hugepages = 0 vm.numa_stat = 1 vm.numa_zonelist_order = Node vm.oom_dump_tasks = 1 vm.oom_kill_allocating_task = 0 vm.overcommit_kbytes = 0 vm.overcommit_memory = 0 vm.overcommit_ratio = 50 vm.page-cluster = 3 vm.panic_on_oom = 0 vm.percpu_pagelist_fraction = 0 vm.stat_interval = 1 vm.swappiness = 60 vm.user_reserve_kbytes = 131072 vm.vfs_cache_pressure = 100 vm.watermark_scale_factor = 10 vm.zone_reclaim_mode = 0
这是一个包含多个与虚拟内存相关的系统参数的列表。以下是其中一些参数的解释:
- `vm.max_map_count`:最大映射数量,限制了内存中可以同时映射的页面数量,从而影响了缓存的大小。
- `vm.dirty_background_bytes` 和 `vm.dirty_background_ratio`:脏页的阈值,当脏页的数量超过该阈值时,系统会开始写回脏页。
- `vm.dirty_bytes` 和 `vm.dirty_ratio`:系统允许脏页占用的内存大小的上限。
- `vm.min_free_kbytes`:系统保留的空闲内存的大小,当空闲内存低于该值时,系统会开始清理缓存。
- `vm.swappiness`:控制系统在内存不足时使用交换空间的程度,该参数的值越高,系统越可能使用交换空间。
你可以使用 `sysctl` 命令来修改这些参数的值,具体的命令如下:
```
sysctl -w <parameter>=<value>
```
其中 `<parameter>` 表示参数名,`<value>` 表示你希望设置的值。请注意,该命令的修改是临时的,如果你想要永久生效,需要将修改写入到 `/etc/sysctl.conf` 配置文件中。
阅读全文