


peak memory measurement of long running process in linuxĮven though the topic is quite old, I want to share another project that emerged from the cgroups Linux kernel feature.Ĭgmemtime measures the high-water RSS+CACHE memory usage of a process.Peak memory usage of a linux/unix process.Minor (reclaiming a frame) page faults: 20014 Maximum resident set size (kbytes): 79304 Example $ /usr/bin/time -v ~/projects/prime_numbers/eratosthenes_prime_ 10 1000000Ĭommand being timed: "/home/saml/projects/prime_numbers/eratosthenes_prime_ 10 1000000"Įlapsed (wall clock) time (h:mm:ss or m:ss): 0:02.19 It reports the peak memory like so: Maximum resident set size (kbytes). Yes ironically the GNU time command can give you the peak memory usage of a process. Syrupy is a Python script that regularly takes snapshots of the memoryĪnd CPU load of one or more running processes, so as to dynamicallyīuild up a profile of their usage of system resources. I haven't used this tool but it sounds like what you're looking for. Here are 2 methods for tracking a processes' peak memory usage.
