- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我在 Windows Server 2008 上运行 Redis 2.8.19。我收到一条错误消息,指出我的 Redis 堆的磁盘空间不足。 (内存映射文件而不是 fork())。
如果我在 cfg 中有“maxheap 1024M”,我只能让 Redis 运行,即使我已将“heapdir”设置为的目录上有大约 50GB 的可用空间。
如果我尝试使用更高的 maxheap 或没有 maxheap 运行它,我会收到此错误 (PowerShell):
PS C:\Users\admasgve> cd D:\redis-2.8.19
PS D:\redis-2.8.19> .\redis-server.exe
[7476] 25 Feb 09:32:38.419 # The Windows version of Redis allocates a large memory mapped file for sharing the heap with the forked process used in persistence operations. This file will be created in the current working directory or the directory specified by the 'heapdir' directive in the .conf file. Windows is reporting that there is insufficient disk space available for this file (Windows error 0x70).
You may fix this problem by either reducing the size of the Redis heap with the --maxheap flag, or by moving the heap file to a local drive with sufficient space. Please see the documentation included with the binary distributions for more details on the --maxheap and --heapdir flags.
Redis can not continue. Exiting.
截图:http://i.stack.imgur.com/Xae0f.jpg
redis.windows.conf:
# Generated by CONFIG REWRITE
loglevel verbose
logfile "stdout"
save 900 1
save 300 10
save 60 10000
dir "D:\\redis-2.8.19"
maxmemory 1024M
# maxheap 2048M
heapdir "D:\\redis-2.8.19"
最后 3 行之外的所有内容都是由 redis 使用 'CONFIG REWRITE' cmd 生成的。我尝试了各种方法,包括 maxmemory、maxheap 和 heapdir。
来自 Redis 文档:
maxmemory / maxheap - the maxheap flag controls the maximum size of this memory mapped file, as well as the total usable space for the Redis heap. Running Redis without either maxheap or maxmemory will result in a memory mapped file being created that is equal to the size of physical memory; The Redis heap must be larger than the value specified by the maxmemory
以前有人遇到过这个问题吗?我做错了什么?
最佳答案
默认情况下,Redis 不使用其主目录中的 conf 文件。您必须在命令行中传递文件:
.\redis-server.exe redis.windows.conf
这是我的 conf 文件中的内容:
maxheap 2048M
heapdir D:\\redisheap
这些设置解决了我的问题。
关于powershell - Redis 服务器不能运行超过 1024M 的 maxheap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28714957/
我有一个最大堆和一个最小堆,其中最大堆的最大元素小于或等于最小堆的最小元素。 我现在想移动最小堆的最小元素成为最大堆的最大元素。 一种方法是弹出最小堆的顶部元素并将其插入最大堆。 有没有更有效的方法来
我将使用priorityQueue实现特定的java maxHeap,如下所示:假设我有一个“Customer”类,它有一个双变量名称“marginalGain”。 PriorityQueue mar
在优先队列的实现中,我必须使用递归来确定作为方法 IsMaxHeap 的参数接收的数组是否是最大堆。 我想确保我评估了所有可能使这项工作正常进行或不正常工作的情况。 static boolean is
我现在正在我的算法课上学习堆,但无法理解在实践中,最大堆如何优于仅将最大值存储在头指针处的链表。 让一个节点有两个比它小的 child 有什么意义,为什么它不能像链表那样只有一个?基本上,堆能做什么而
刚刚通过创建堆遇到了一些问题。我根据我正在使用的接口(interface)设置了限制,并且我正在尝试访问一个可以有效添加堆的构造函数,以证明与通过插入添加堆相比,时间复杂度有所降低。换句话说,我需要这
我目前正在开发一个必须创建最大堆的项目。我目前正在使用我的教科书版本的堆,它看起来像: public MaxHeap(int initialCapacity) { if (initialCap
我正在 Java 中实现一个 MaxHeap,它根据其键进行排序。每个键还与一个值相关联。当我尝试运行程序时,出现异常:Exception in thread "main"java.lang.Clas
#include #include #include #include typedef struct listNode { int id; struct listNode *next;
这是我的代码。我对 c 和指针很陌生,所以可能是指针上的错误。 #include #include typedef int (*comparatorPtr)(void*, void*); bool
假设我们要根据值对 HashMap 进行排序。我们实现了一个带有比较器的 priorityQueue 来做到这一点。因此,生成的 pq 从索引 0 到末尾从最大到最小排序。 代码如下: Priorit
此信息与树的类型有关。换句话说,你应该认识到这些信息金字塔的顶峰(Max Heap),或二叉搜索树或两者的组合或它们都没有。输入格式如下: (94,RR) (17,L) (36,RL) (51,R)
我通过扩展 ArrayList 实现了堆。然而,它似乎作为 minheap 工作得很好(与这段代码几乎没有区别),但它不能作为 maxheap 正常工作。我认为我有一部分或一部分使用不当。我想知道哪里
我在网上搜索了 MinHeap 和 Maxheap 的 Python 实现。 import heapq class MinHeap: def __init__(self): s
我在 Windows Server 2008 上运行 Redis 2.8.19。我收到一条错误消息,指出我的 Redis 堆的磁盘空间不足。 (内存映射文件而不是 fork())。 如果我在 cfg
我想知道java是否有任何集合可以帮助我实现minheap和maxheap。我知道我可以使用 PriortyQueue 数据结构来实现 maxheap。我们可以对 minheap 使用同样的方法吗?如
我正在使用 运行 Findbugs with Ant任务。我正在运行 Ant build.xml来自 Jenkins 。 我的构建卡在低堆大小上:Exception in thread "main"
我有这段 heapSort 的代码,它工作正常。我还了解当起始 index 为 1 而不是 0 时 algorithm 的工作原理。我的问题是下面的 maxheap 方法本身适用于所有大于零的索引,但
我是一名优秀的程序员,十分优秀!