General :: Limit The Memory Usage Of A Specific Process?

Apr 24, 2010

I've written a program for a class that my professor will be testing in various low memory environments to see how it behaves when the program runs out of memory. Is there a way I can simulate the execution in a low memory environment without creating a virtual machine?

View 1 Replies


General :: Ubuntu - Memory Full, Process Memory Usage Doesn't Add Up In Top?

Mar 18, 2011

I have a computer with 16GB of ram. At the moment, top shows all the RAM is taken, (NOT by cache), but the RAM used by the various processes is very far from 16GB.I have seen this problem several times, but I don't understand what is happening.My only remedy so far has been to reboot the machine.

View 1 Replies View Related

General :: Way To Limit CPU Usage For Some Process?

Sep 21, 2009

I'm writing a shell script which aims to create a safe gtared (xxx.sql.gz) copy of MySQL databases.This script is planned to be Cron-Jobed.

Well, what I need to add to this shell, is something that limit CPU usage for the whole process (just in case if the database being generating is a huge one.)So, after few time of googling I found couple of solutions:

- Using cpulimit.
I tried to place the code in Position(1) and Position(2) but it didn't seem to be working fine.. Any idea about the right use?

And the other Solution is:- Using nice.

Well, assuming I named my shell script (sqlbacker)..

Finally, this is my first time I ever write a shell, so correct me if somewhere I made a mistake :-)
(The script itself works perfectly)

View 6 Replies View Related

General :: Need To Limit CPU Usage Of Process

Jan 26, 2010

There's a disfunctional process eating copious cpu time.Is there a way to effectively assign it a high nice value? I need to do this whenever it runs, for whatever reason, and I can't be bothered to track down all the scripts and scenarios that cause it to run and change the script to use nice. And I can't be bothered to manually run renice whenever I notice that it's running.

I want the OS to automatically assign a high nice value to this process, perhaps based on the processes name. Is this possible?Presumably, a cron job could run every 5 minutes and run "renice" on every process matching a given name, but I'm hoping for a solution with more finess.

View 2 Replies View Related

General :: Display The Memory Usage Of Each Process If I Do A 'ps -ef'?

Jan 29, 2010

In linux, how can I display memory usage of each process if i do a 'ps -ef'?I would like to the 'virtual memory', 'res memory', 'shared memory' of each progress. I can get that via 'top', but I want the same info in 'ps -ef ' so that I can pipe the output to 'grep {my process name}'.

View 3 Replies View Related

General :: Calculating Process Memory Usage?

May 13, 2010

What originally seemed like an easy thing to calculate has given me a big headache. Perhaps someone can help me with my issue. I am trying to find, in particular, how much memory certain application processes are taking. The process always is the same name, main_server, but with an argument to tell it what to do when running as a daemon.

When running the following command against all "main_server" processes, it produces a result in megabytes based on the output of the rss field in 'ps'.

for ea in
`ps -e -orss=,args= |
sort -b -k1,1n |
grep main_server |
grep -v "grep main_server" |


Currently I am left scratching my head. For capacity planning purposes, it would be nice to know how many more 'main_server' processes could run on the system without causing it to swap. Knowing the buffer and cache usage will go down as running processes demand more memory, I prefer to look at the free memory excluding cache and buffers. However, since 'ps' is reporting the processes are using more memory than free reports is in use without those things, I have no way to know how many more processes the system can support. I played around with different fields in 'ps', such as vsize, size, etc, but with no luck in matching up any numbers.

View 7 Replies View Related

General :: Get The Each Process Actual RAM Memory Usage In 2.6.21 Or Higher Version

Feb 8, 2010

I woukld like to know the kernel command or linux kernel file name where i can get the process actual physical RAM usage in linux version 2.6.21 or hiher version.

View 2 Replies View Related

CentOS 5 :: Control Groups To Limit The Memory Usage?

Aug 13, 2011

I was looking into using control groups to limit the memory usage of each user on my CentOS system. I was told that this required me to recompile the kernel to have cgroup support. Is this true? Or is there a kernel module that will allow cgroups to work for users and groups on the system without kernel re-compile? Or, is there another way to limit the users memory usage? I have tried ulimit and it doesn't seem to work right.

I ask since this setup will be on a VPS system, that means to re-compile the kernel I need to use Xen instead of OpenVZ. Plus I have never in my life re-compiled the kernel, least of all with different modules ha ha ha so I would have to pay my NOC to do it. So if I don't HAVE to recompile the kernel to get cgroup support.

View 2 Replies View Related

Server :: Monitor Memory Usage For Process

Jan 24, 2011

I use linux and Unix and I want to monitor the memory usage for process. To prevent memory leakage and out of memory of the system. Any command or sytnax , have more better and presentable data than below command about memory usage of one process ?

View 3 Replies View Related

Software :: Monitor Memory Usage Of A Process?

Sep 2, 2010

How can I periodically monitor memory usage of a process in linux.Can it be dumped in some file.So that later I can see what was the process behaviour in taking memory.

View 2 Replies View Related

General :: Status Of Memory Usage And Disk Usage Using Sigar In Windows And Ubuntu

Mar 15, 2010

I was trying to get the status of memory usage and disk usage using sigar in windows and ubuntu. done this in windows by just copying the sigar library into jdk library. But i was unable to do so in ubuntu. I've copied the library to java-6-sun library but still can't run the program.

View 14 Replies View Related

General :: Unix - Monitor Average CPU Usage And RAM Usage On One Process System?

Nov 15, 2010

Is there any way to monitor one process' CPU usage and RAM usage over time on Linux? I am trying to change to a cheaper VPS and need to work out what level of CPU and RAM I need!

View 2 Replies View Related

Server :: Limit The Suphp User Memory Limit?

May 12, 2010

I have a VPS server with 512 MB memory. The php.ini is set so script memory limit = 16 MB. However, I have noticed in my top report, instances like the following:


5484 coldclim 25 0 46476 32m 5920 R 0.0 6.4 0:00.93 php

The bold number of 6.4 is the % of sever memory this process is using. 6.4 % of 512 MB of memory is about 32 MB of memory, so it appears that this isn't being limited by php.ini. Am I correct? This leads to the next question: Is there some way to limit the amount of memory a single suphp process can use? (Basically, something like the setting in php.ini which limits suphp processes in the same way.)

View 2 Replies View Related

General :: How To Limit Printer Usage By Samba Server

Dec 4, 2010

How can I limit printer usage by SAMBA server?

View 6 Replies View Related

General :: Limit Any Process From Using More Than 500 MB Of RAM?

Jan 30, 2011

I would like to limit any process from using more than 500 MB of RAM. AFAIK this is done using RSS in /etc/security/limits.conf but the process called gnome-panel apparently is using 618436 kB of VmRSS. How can this be ?


* hard rss 512000


username@debian:~$ cat /proc/3002/status
State:S (sleeping)


View 4 Replies View Related

General :: Physical And Virtual Memory Upper Limit For 32 Bit?

Jun 26, 2010

I have a 32 bit Ubuntu installed and my Laptop has 4GB RAM, but only 3GB is considered by Linux. My question is: what is the reason for the upper limit on physical memory ?

dmesg | grep Memory [0.000000] Memory: 3052428k/3112960k available (4673k kernel code, 56364k reserved, 2121k data, 656k init, 2200904k highmem) I am familiar with the virtual memory concept where linux splits upper 1GB for kernel and lower 3GB for user processes. In total, linux 32bit can address 4GB virtual addresses. Does this meant that 1GB of physical memory is already mapped to 1GB of kernel space and Linux only shows the remaining 3GB physical memory left for the user in the above command.

I did some searching on the internet and found some articles related to this, but it only confused me further since some articles suggest 4GB is the upper limit with mentioning whether it's virtual or physical memory, some bring in the concept of PAE, etc. I'm relative new to Linux's memory management, so it'd be really helpful if someone could answer this.

View 4 Replies View Related

Software :: Free Database That Has Low Memory Usage And Innodb And Memory Like Engin

May 3, 2011

I am looking for free database that has low memory usage and innodb and memory like engins that has C API and support trigger and client/server support for using in embedded linux systems.

View 8 Replies View Related

General :: TOP Command Memory Usage?

Apr 13, 2011

Under SuSE, (Mem: 31908592k total, 31421504k used,) how do i know which process or program using my memory?

View 2 Replies View Related

General :: Memory Usage In Top Is Not Correct?

Apr 15, 2011

I am a bit worried about my linux vserver box. No more memory is left. To investigate this issue, i was looking at "top". But it deeply confuses me. It seems that no more memory is left, altough the process list in top never adds up to 100%


View 4 Replies View Related

General :: How To Maximize The Memory Usage

Mar 31, 2010

Maximize Linux Memory usage

View 11 Replies View Related

General :: Monitoring A Box - Memory Usage ?

Jul 15, 2010

I wanted to know the best way to monitor memory usage, us space and processes and receive an email if a problem occurs?

View 2 Replies View Related

General :: Memory Usage Check In Details?

Dec 18, 2010

I"m unable to find the memory usage however top shows me the following results.

Tasks: 90 total, 2 running, 88 sleeping, 0 stopped, 0 zombie
Cpu(s): 21.1%us, 1.4%sy, 0.0%ni, 74.0%id, 2.4%wa, 0.0%hi, 1.0%si, 0.0%st
Mem: 8313376k total, 7969976k used, 343400k free, 185496k buffers


and free shows the following.

total used free shared buffers cached
Mem: 8118 7764 354 0 181 7335
-/+ buffers/cache: 247 7870
Swap: 4000 0 4000
Total: 12119 7764 4354

how can i find the usage of memory which is being showed by top and free.

View 3 Replies View Related

General :: Detecting Source Of Memory Usage On A Box?

Jan 9, 2011

I have a toy Linux box with 256mb RAM running Ubuntu 10.04.1 LTS. Here is the output of free -m:

total used free shared buffers cached
Mem: 245 122 122 0 19 64
-/+ buffers/cache: 38 206


View 3 Replies View Related

General :: Multithreaded Application / CPU And Memory Usage

Feb 14, 2009

We run Jboss app server that of course is all multithreaded under one JVM. I have couple of question regarding monitoring on per thread basis:

1. Is there a way to see which thread is bound to which CPU core?
2. Is there a way to see the CPU, Memory usage per thread? Something like prstat on Sun box which is real time and gives detailed information about threads per CPU

View 6 Replies View Related

General :: Top - Order Pids By Memory Instead Of CPU Usage

Jan 14, 2009

Command top displays the pids (tasks) by order of CPU usage. Could I make it order them by memory usage?

View 3 Replies View Related

Software :: Memory Usage General Definitions On Top ?

Oct 27, 2009

I was playing with top to understand ram memory usage of every thread but i am in trouble with some basic questions:

- what difference is between 'thread' and 'process'?

- what does 'virtual image size' means, and Resident size, Shared Mem size, Code size, Data+Stack size, Swapped size? I thought that the only important field is 'Memory usage', but it is represented as a percent value...

I have googled a bit, but nothing really helped me. before opening top i thought that memory is divided in several pages by every process/thread (?) and that this occupied memory would be counted as 'used memory', and nothing else.

View 8 Replies View Related

General :: Limit The Upload / Download Of A Program Already Running (A Process)?

Jun 2, 2011

I have already tried trickle and wondershaper. I need a program that can limit the speed of download/upload of an already running program. Similar to the how NetLimiter in Windows limits already running processes. Using Linux.

View 1 Replies View Related

General :: CPU Usage Of Process

Jul 15, 2011

I am currently writing a JAVA script to monitor certain unix processes through JConsole. Upon having lots of trouble with runtime.exec, i decided to bypass the top/ps command call and just get the information straight from /proc/*pid*/whatever.Now i can pull back any information from any of the files I want, and the current way i determine the CPU usage of a process is as follows:Add the UTime and STime of that process from /proc/pid/stat then divide my pidCpu by UTime + STime + NTime from /proc/stat, then multiply that by 100, should give me the % cpu usage a process is using, right?Theory being if I get the jiffies assigned to my process, I can divide that by the total jiffies the cpu assigns.

However, my results seem to vary from the ones gathered from top and ps. What am I doing wrong?

View 2 Replies View Related

General :: Process CPU Usage

Sep 6, 2010

If I, using sar or vmstat, found that there is a CPU load on my Linux box. How can I know the top processes consuming the CPU?

View 9 Replies View Related

General :: Command To Check Specific Processes That's Using The Most IO/disk Usage?

Apr 12, 2011

Is there a command to check specific processes that's using the most IO/disk usage? I know sar and ps but I want more specific details on IO on individual processes

View 5 Replies View Related

Copyrights 2005-15, All rights reserved