Linked Questions
24 questions linked to/from Peak memory usage of a linux/unix process
43 votes
2 answers
48k views
Python3 - Is there a way to iterate row by row over a very large SQlite table without loading the entire table into local memory?
I have a very large table with 250,000+ rows, many containing a large text block in one of the columns. Right now it's 2.7GB and expected to grow at least tenfold. I need to perform python specific ...
26 votes
2 answers
22k views
How to get the memory usage of a OS X/macOS process
In Ubuntu, /usr/bin/time -v any-command tells me the memory usage of any-command and some information. (Source: https://stackoverflow.com/a/774601/2885946) I want to do the same thing in OS X/macOS. ...
37 votes
1 answer
12k views
Maximum resident set size does not make sense
I am trying to measure memory consumption of a running program in Linux. I wrote a C program to allocate 1G memory, then use time to output its "Maximum resident set size": /usr/bin/time -f '%Uu %Ss %...
15 votes
3 answers
13k views
How to record the peak memory usage of a Docker container?
I'm running a number of short-lived docker containers each of which does some memory-intensive batch processing. I'm looking for a way to find the peak memory usage each container hit while it was ...
9 votes
2 answers
2k views
Is there a way to measure how much a shell command used memory?
Is there a way to measure how much an executed terminal command/operation used memory, like the built-in command time for measuring execution time. I'd like to compare commands with different ...
6 votes
5 answers
4k views
gd-png cannot allocate image data
I have an old code base that makes extensive use of GD (no, switching to imagemagick is not an option). It's been running for several years, through several versions. However, when I run it in my ...
9 votes
2 answers
4k views
How does /usr/bin/time measure memory usage?
I am implementing an algorithm and want to measure the time and memory consumption of it. To my aid I've written my own measuring utility, which reads from /proc/[pid]/stat the amount of user and ...
3 votes
2 answers
2k views
How much memory is consumed if I create a ruby object?
I want to know how much memory is consumed if I create a ruby object. Does Ruby have any method to tell? Is there any difference for memory consumption in the following? users = User.where("...
5 votes
1 answer
4k views
Does 'maximum resident set size' equal 'required RAM size for the process at least'?
Can I say 'maximum resident set size of a process' equals 'required RAM size at least for the process'? Am I right? If not, why?
1 vote
2 answers
2k views
How to evaluate the CPU and Mem usage for speccific command/docker in linux?
I'm composing yaml file for scripts running in docker and orchestrated by kubernetes. Is there a way to evaluate the resource utilization for a specicific command or docker, or what's the best ...
3 votes
1 answer
2k views
How to use dtrace to determine the maximum memory usage of a process
The following dtrace script will give the sum of all allocations a process has performed: pid$target::malloc:entry { @ = sum(arg0); } Now, I'm rather interested in the maximum total allocated memory ...
0 votes
1 answer
1k views
Correctly getting process ID
sometimes I need to follow a process and I always find a bash-script doing pid=$1. As far as I understand, it should get the process ID that I sent to the first shell instance I created that is ...
2 votes
1 answer
2k views
slurm: produce stats job in log files
I use slurm to run jobs on a cluster. I would like to get stats about the job, such as used memory, number of processors and wall-time. I would like to get such information in the log file. I think ...
3 votes
1 answer
967 views
Unit of maximum resident set size in the output of time
Can someone let me know what is the unit of maximum resident size in the output below? /usr/bin/time -l mvn clean package -T 7 -DskipTests ... real 530.51 user 837.49 sys 64.28 ...
0 votes
1 answer
959 views
How to get the memory usage of a process executed by proc_open()
I have to measure the memory usage and the execution time of the process executed by proc_open(). Measuring the time is not that hard, but I can't find any method to get the memory usage. (the program ...