memory

Change number of threads for Jenkins server

血红的双手。 提交于 2020-01-11 05:12:06
问题 I installed Jenkins on my vserver. When I had a look at htop Jenkins was running with 30 thread, each was allowed to allocate 247MB memory and up to 1181MB virtual memory. Because I've only a small vserver I tried to change the number of threads. But I could not find any configuration file. I installed jenkins via aptitude install jenkins and in htop I can see that Jenkins is running from: /usr/bin/java -jar /usr/share/jenkins/jenkins.war Tomcat isn't installed as well as jetty isn't

Memory consumption of NumPy function for standard deviation

[亡魂溺海] 提交于 2020-01-11 04:30:09
问题 I'm currently using the Python bindings of GDAL to work on quite large raster data sets (> 4 GB). Since loading them into memory at once is no feasible solution for me I read them into smaller blocks and do the computations piece by piece. To avoid a new allocation for every block read I'm using the buf_obj argument (here) to read the values into an preallocated NumPy array. At one point I have to compute the mean and standard deviation of the entire raster. Naturally I've used np.std for the

How do I find the physical memory size in Java?

て烟熏妆下的殇ゞ 提交于 2020-01-11 04:27:09
问题 I'm writing an installer that will tune the configuration of the product for the particular hardware on which it will be run. In particular, I want to determine how much physical RAM is installed in the system so I can estimate how much memory to allocate to the product when it runs. Ideally, I'd like to do this in a platform-independent, pure Java way, as the installer will need to run on several different platforms, but in case this isn't possible, solutions for Windows are preferred as

Why does malloc allocate more memory spaces than I ask for? [duplicate]

一笑奈何 提交于 2020-01-11 04:06:05
问题 This question already has answers here : Malloc vs custom allocator: Malloc has a lot of overhead. Why? (3 answers) Closed 3 years ago . I found that malloc() allocates more memory spaces than I ask for. struct { void *ptr; int var; } msg; // 16 bytes (checked by sizeof()) for (int i = 0; i < 100000000; i++) malloc(sizeof(msg)); As the aforementioned code, malloc() actually allocate 32 bytes per function call (calculated by top ), but valgrind shows only 16 bytes per call indeed. Why does

Dereferencing function pointers in C to access CODE memory

谁都会走 提交于 2020-01-11 02:16:33
问题 We are dealing with C here. I'm just had this idea, wondering if it is possible to access the point in memory where a function is stored, say foo and copying the contents of the function to another point in memory. Specifically, I'm trying to get the following to work: #include <stdlib.h> #include <stdio.h> #include <string.h> void foo(){ printf("Hello World"); } int main(){ void (*bar)(void) = malloc(sizeof foo); memcpy(&bar, &foo, sizeof foo); bar(); return 0; } But running it gives a bus

SqlServer 内存篇(六)—— sqlserver 2012内存管理新特性

試著忘記壹切 提交于 2020-01-10 23:26:35
一、 内存管理器变化 sqlserver 2005和2008时,8K和大于8K的内存分配严格分开,由两个内存分配管理器分别完成,可能导致buffer pool还有内存,但multi-page部分却不足了。 sqlserver 2012的重大改进之一就是——所有内存请求都通过新的内存管理器完成。 1)新内存管理器支持分配所有大小 至此,single-page allocator和multi-page allocator都将退出历史舞台。 不论内存大小,sqlserver内存管理器使用内存的方式只分为:普通页、锁定页、大内存页三种模型。 2)新内存管理器对某些特定负载进行了优化 3)新内存管理器完全支持NUMA 4)虚拟地址空间管理完全动态,包括32位 5)所有通过内存管理器分配的内存均受max server memory参数控制 6)32位实例不再支持AWE 7)Lock page in memory使用方法大大简化 sqlserver 2012开始,不论版本和处理器类型,只要启动账号有Lock page in memory权限,就可以使用该功能。企业版、商业智能版、标准版无需任何实质和trace flag即可直接使用。 如何看是否启用Lock page in memory? sqlserver错误日志会有相应信息 Using locked pages in the memory

linux 内存学习链接

笑着哭i 提交于 2020-01-10 22:06:20
以下是几个关于linux 内存知识的文章,可以方便的学习linux 内存管理以及排查实际问题 参考链接 https://techtalk.intersec.com/2013/07/memory-part-1-memory-types/ https://techtalk.intersec.com/2013/07/memory-part-2-understanding-process-memory/ https://techtalk.intersec.com/2013/08/memory-part-3-managing-memory/ https://techtalk.intersec.com/2013/10/memory-part-4-intersecs-custom-allocators/ https://techtalk.intersec.com/2013/12/memory-part-5-debugging-tools/ https://techtalk.intersec.com/2014/09/memory-part-6-optimizing-the-fifo-and-stack-allocators/ 来源: https://www.cnblogs.com/rongfengliang/p/12178222.html

Visual Studio 2010 — how to reduce its memory footprint

故事扮演 提交于 2020-01-10 22:04:59
问题 I have a solution with just under 100 projects in it, a mix of C++ and C# (mostly C#). When working in VS2005, the working set of Visual Studio is considerably smaller than that of VS2010. I was wondering if there are some things that can be turned off, so I can develop in VS2010 under 32-bit OS without running out of memory. 回答1: You can try using the Solution Load Manager. It'll let you mark some of the projects files as load on demand or not load at all. That may help. 回答2: A 64-bit OS

Visual Studio 2010 — how to reduce its memory footprint

谁说胖子不能爱 提交于 2020-01-10 22:04:23
问题 I have a solution with just under 100 projects in it, a mix of C++ and C# (mostly C#). When working in VS2005, the working set of Visual Studio is considerably smaller than that of VS2010. I was wondering if there are some things that can be turned off, so I can develop in VS2010 under 32-bit OS without running out of memory. 回答1: You can try using the Solution Load Manager. It'll let you mark some of the projects files as load on demand or not load at all. That may help. 回答2: A 64-bit OS

Count subsequences in hundreds of GB of data

你说的曾经没有我的故事 提交于 2020-01-10 20:11:28
问题 I'm trying to process a very large file and tally the frequency of all sequences of a certain length in the file. To illustrate what I'm doing, consider a small input file containing the sequence abcdefabcgbacbdebdbbcaebfebfebfeb Below, the code reads the whole file in, and takes the first substring of length n (below I set this to 5, although I want to be able to change this) and counts its frequency: abcde => 1 Next line, it moves one character to the right and does the same: bcdef => 1 It