I am running a very large process (14 Gb), although it require less memory than is available, it picks up swap memory and the process run very slowly. Any ideas on why this is so. Thanks in advance.
free -m total used free shared buffers cached Mem: 16024 11380 4644 0 115 1697 -/+ buffers/cache: 9567 6457 Swap: 16386 3449 12936
top PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 22983 mendez 25 0 9284m 9.0g 6580 R 99.9 57.7 2507:09 pulse
more /proc/cpuinfo
cpu family : 15 model : 5 model name : AMD Opteron(tm) Processor 248 stepping : 8 cpu MHz : 2205.069 cache size : 1024 KB Camilo Ruiz Salamanca Optics group.
On Mon, Sep 27, 2004 at 07:01:28PM +0200, Camilo Ruiz M?ndez wrote:
I am running a very large process (14 Gb), although it require less memory than is available, it picks up swap memory and the process run very slowly. Any ideas on why this is so.
Probably because your memory allocator doesn't give the memory it frees back to the kernel. -Andi
El 27/09/2004, a las 19:10, Andi Kleen escribió:
On Mon, Sep 27, 2004 at 07:01:28PM +0200, Camilo Ruiz M?ndez wrote:
I am running a very large process (14 Gb), although it require less memory than is available, it picks up swap memory and the process run very slowly. Any ideas on why this is so.
Probably because your memory allocator doesn't give the memory it frees back to the kernel.
Is this a problem of compilation in my program, or related to the kernel of the system.? Basically i compile a c++ program using
gcc -v ./configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib64 --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux Thread model: posix gcc version 3.3.3 (SuSE Linux)
The allocation is done using code like this
#include
On Mon, Sep 27, 2004 at 07:36:57PM +0200, Camilo Ruiz M?ndez wrote:
El 27/09/2004, a las 19:10, Andi Kleen escribi?:
On Mon, Sep 27, 2004 at 07:01:28PM +0200, Camilo Ruiz M?ndez wrote:
I am running a very large process (14 Gb), although it require less memory than is available, it picks up swap memory and the process run very slowly. Any ideas on why this is so.
Probably because your memory allocator doesn't give the memory it frees back to the kernel.
Is this a problem of compilation in my program, or related to the kernel of the system.?
Most likely it is a memory leak in your program. -Andi
El 27/09/2004, a las 19:37, Andi Kleen escribió:
On Mon, Sep 27, 2004 at 07:36:57PM +0200, Camilo Ruiz M?ndez wrote:
El 27/09/2004, a las 19:10, Andi Kleen escribi?:
On Mon, Sep 27, 2004 at 07:01:28PM +0200, Camilo Ruiz M?ndez wrote:
I am running a very large process (14 Gb), although it require less memory than is available, it picks up swap memory and the process run very slowly. Any ideas on why this is so.
Probably because your memory allocator doesn't give the memory it frees back to the kernel.
Is this a problem of compilation in my program, or related to the kernel of the system.?
Most likely it is a memory leak in your program.
Thanks. I'll check. Camilo
-Andi
participants (2)
-
Andi Kleen
-
Camilo Ruiz Méndez