memory

CUDA: Memory copy to GPU 1 is slower in multi-GPU

删除回忆录丶 提交于 2020-01-23 04:02:09
问题 My company has a setup of two GTX 295, so a total of 4 GPUs in a server, and we have several servers. We GPU 1 specifically was slow, in comparison to GPU 0, 2 and 3 so I wrote a little speed test to help find the cause of the problem. //#include <stdio.h> //#include <stdlib.h> //#include <cuda_runtime.h> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <cutil.h> __global__ void test_kernel(float *d_data) { int tid = blockDim.x*blockIdx.x + threadIdx.x; for

YARN的内存和CPU配置

纵然是瞬间 提交于 2020-01-23 03:41:12
Hadoop YARN同时支持内存和CPU两种资源的调度,本文介绍如何配置YARN对内存和CPU的使用。 YARN作为一个资源调度器,应该考虑到集群里面每一台机子的计算资源,然后根据application申请的资源进行分配Container。Container是YARN里面资源分配的基本单位,具有一定的内存以及CPU资源。 在YARN集群中,平衡内存、CPU、磁盘的资源的很重要的,根据经验,每两个container使用一块磁盘以及一个CPU核的时候可以使集群的资源得到一个比较好的利用。 内存配置 关于 内存 相关的配置可以参考hortonwork公司的文档 Determine HDP Memory Configuration Settings 来配置你的集群。 YARN以及MAPREDUCE所有可用的内存资源应该要除去系统运行需要的以及其他的hadoop的一些程序,总共保留的内存=系统内存+HBASE内存。 可以参考下面的表格确定应该保留的内存: 每台机子内存 系统需要的内存 HBase需要的内存 4GB 1GB 1GB 8GB 2GB 1GB 16GB 2GB 2GB 24GB 4GB 4GB 48GB 6GB 8GB 64GB 8GB 8GB 72GB 8GB 8GB 96GB 12GB 16GB 128GB 24GB 24GB 255GB 32GB 32GB 512GB

What happens when you run out of ram with mlockall set?

一世执手 提交于 2020-01-23 02:01:28
问题 I am working on a C++ application that requires a large amounts of memory for a batch run. (> 20gb) Some of my customers are running into memory limits where sometimes the OS starts swapping and the total run time doubles or worse. I have read that I can use the mlockall to keep the process from being swapped out. What would happen when the process memory requirements approaches or exceeds the the available physical memory in this way? I guess the answer might be OS specific so please list

iOS safari crashing (a problem repeatedly occured)

六月ゝ 毕业季﹏ 提交于 2020-01-23 01:44:07
问题 I'm developing a website and have recently run into a problem when testing on my iPhone X - the site wont load. Safari tries to load it, then reports the error 'this web page was reloaded because a problem occured', and after a couple of tries it gives up and reports 'a problem repeatedly occured'. Chrome on my iPhone also doesn't load the site. At this time I can't share the website publicly, but there are no errors reported in the chrome desktop console. In fact, the website runs perfectly

Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) 解决办法(php内存耗尽报错)

一个人想着一个人 提交于 2020-01-23 00:10:53
内存已耗尽,这关系到PHP的memory_limit的设置问题,根据自己的需要及参考本机的内存大小修改php内存限制。 这里有三种解决方案 : 1、修改php.ini (改配置) memory_limit = 128 这种方法需要重启服务器,很显然,此方法对虚拟机有限制。 2、通过ini_set函数修改配置选项值 (改代码) ini_set (‘memory_limit’, ‘128M’) ; 3、直接取消PHP的内存限制(改代码) ini_set ("memory_limit","-1"); 值得注意的是 : 如果通过上面的方式修改后还会报这个错误,那你要检查一下你写的代码是否存在效率问题。(举例:从数据库查询到的数据加载到内存里面,然后php 进行数据处理,如果代码写的不是很严谨存在效率问题,特别是数据量非常大的时候也会导致内存耗尽) 来源: CSDN 作者: 昊喵喵博士 链接: https://blog.csdn.net/qq_30202073/article/details/103802426

Disabling Local JMX Connections on JVM

戏子无情 提交于 2020-01-22 18:50:33
问题 We are writing a java program which keeps a password in memory. Unfortunately, the user can easily use jconsole or jmap to create a heap dump file and open it to find the password. I think jconsole connects jvm using local sockets. I wanna know, is there any way to disable jmx even for local users? Is there any way to totally disable heap dumps? As the user have access to the memory segment, this is possible to access the password anyway. However, I wanna disable standards ways of doing that

Disabling Local JMX Connections on JVM

ε祈祈猫儿з 提交于 2020-01-22 18:50:04
问题 We are writing a java program which keeps a password in memory. Unfortunately, the user can easily use jconsole or jmap to create a heap dump file and open it to find the password. I think jconsole connects jvm using local sockets. I wanna know, is there any way to disable jmx even for local users? Is there any way to totally disable heap dumps? As the user have access to the memory segment, this is possible to access the password anyway. However, I wanna disable standards ways of doing that

Dynamically allocate C struct?

社会主义新天地 提交于 2020-01-22 14:36:08
问题 I want to dynamically allocate a C struct: typedef struct { short *offset; char *values; } swc; Both 'offset' and 'values' are supposed to be arrays, but their size is unknown until runtime. How can I dynamically allocate memory for my struct and the struct's arrays? 回答1: swc *a = (swc*)malloc(sizeof(swc)); a->offset = (short*)malloc(sizeof(short)*n); a->values = (char*)malloc(sizeof(char)*n); Where n = the number of items in each array and a is the address of the newly allocated data

Copying from One Dynamically Allocated Array to Another C++

亡梦爱人 提交于 2020-01-22 12:41:46
问题 This seems like it should have a super easy solution, but I just can't figure it out. I am simply creating a resized array and trying to copy all the original values over, and then finally deleting the old array to free the memory. void ResizeArray(int *orig, int size) { int *resized = new int[size * 2]; for (int i = 0; i < size; i ++) resized[i] = orig[i]; delete [] orig; orig = resized; } What seems to be happening here is that resized[i] = orig[i] is copying values by reference rather than

Memory leak in JDBC4Connection

為{幸葍}努か 提交于 2020-01-22 12:39:51
问题 I'm trying to catch a memory leak in one of our Java daemons, and after dumping the memory and analyzing it via Memory Analyzer Tool, noticed that most of the leak is caused by the JDBC4Connection: 10 instances of "com.mysql.jdbc.JDBC4Connection", loaded by "sun.misc.Launcher$AppClassLoader @ 0x2aaab620ed00" occupy 858,283,752 (81.55%) bytes. Biggest instances: * com.mysql.jdbc.JDBC4Connection @ 0x2aaab64ad820 - 87,110,160 (8.28%) bytes. * com.mysql.jdbc.JDBC4Connection @ 0x2aaab64af520 - 86