User Tools

Site Tools


how_we_measure

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
how_we_measure [2020/12/19 20:03] – [Measuring with smem] senioradminhow_we_measure [2021/01/16 22:35] (current) – [Measuring with smem] senioradmin
Line 15: Line 15:
 The programming language is a strong indicator - a program which was programmed in a language that translate directly to machine code, made by a compiler will be more efficient and lightweight as a program which was programmed in a language which bust be run by an interpreter or bytecode interpreter. The programming language is a strong indicator - a program which was programmed in a language that translate directly to machine code, made by a compiler will be more efficient and lightweight as a program which was programmed in a language which bust be run by an interpreter or bytecode interpreter.
  
-An even stronger indicator is memory usage. So we will measure the memory usage oa a program to give clear recommendations. we do this by using the program [[https://www.selenic.com/smem/|smem]].+An even stronger indicator is memory usage. So we will measure the memory usage of a program to give clear recommendations. we do this by using the program [[https://www.selenic.com/smem/|smem]].
  
 ===== Measuring with smem ===== ===== Measuring with smem =====
  
  
-When it comes to memory measurement there are different terms with different meanings. Most standard Unix tools are reporting the "resident set size" (RSS) - which roughly is the memory usage of a program plus the shared libraries it needs. Because it includes the whole shared memory it shares with other programs this isn't a fair representation of memory a program really needs.+When it comes to memory measurement there are different terms with different meanings. Most standard Unix tools are reporting the "resident set size" ([[glossary#RSS|RSS]]) - which roughly is the memory usage of a program plus the shared libraries it needs. Because it includes the whole shared memory it shares with other programs this isn't a fair representation of memory a program really needs.
  
-The "unique set size" (USS) on the other hand underestimates the programs memory footprint, because it reports only the memory needed by the program binary only, without any shared library it might need.+The "unique set size" ([[glossary#USS|USS]]) on the other hand underestimates the programs memory footprint, because it reports only the memory needed by the program binary only, without any shared library it might need.
  
-The "proportional set size" (PSS) smem reports is the memory the program plus the '"fair share" of each shared area to give a realistic measure.' That means, of course, the program's PSS will shrink the more programs with the same shared libraries will run. +The "proportional set size" ([[glossary#PSS|PSS]]) smem reports is the memory the program plus the '"fair share" of each shared area to give a realistic measure.' That means, of course, the program's PSS will shrink the more programs with the same shared libraries will run. 
  
-We will measure all programs under the same condition, by running as few as background processes as possible and only those which are needed for the program - obviously we have to run X11 to measure the memory usage for a graphical program which runs under X11.+We will measure all programs under the same condition (a machine with 2 GB RAM), by running as few as background processes as possible and only those which are needed for the program - obviously we have to run X11 to measure the memory usage for a graphical program which runs under X11 (using a resolution of 1024x768)As it is default on Linux, the **unit used is kilobyte (kB)**
  
  
  
  
how_we_measure.1608408219.txt.gz · Last modified: 2020/12/19 20:03 by senioradmin

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki