Difference between revisions of "Memory"

From Freephile Wiki
Jump to navigation Jump to search
(Document some of the things I learned about Transparent HugePages)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
[[File:Media-flash-memory-stick.svg]]
 
[[File:Media-flash-memory-stick.svg]]
  
Python, Likers and Virtual Memory https://www.youtube.com/watch?v=twQKAoq2OPE
+
Python, Linkers and Virtual Memory https://www.youtube.com/watch?v=twQKAoq2OPE
  
 
Reporting on "actual" memory usage of your application with smem http://linuxaria.com/pills/linux-terminal-check-who-uses-all-your-memory-with-smem
 
Reporting on "actual" memory usage of your application with smem http://linuxaria.com/pills/linux-terminal-check-who-uses-all-your-memory-with-smem
 +
 +
==Transparent Hugepages ==
 +
* https://access.redhat.com/solutions/46111 for Fedora and RHEL Note: their commands at the end of the article for determining if HugePages are disabled do not work in my limited tests. I have both Ubuntu and CentOS systems which are using HugePages, yet <code>grep -i HugePages_Total /proc/meminfo</code> <code>cat /proc/sys/vm/nr_hugepages</code> and <code>sysctl vm.nr_hugepages</code> all report zero. Meanwhile <code>grep AnonHugePages /proc/meminfo</code> and <code>grep -e AnonHugePages  /proc/*/smaps | awk  '{ if($2>4) print $0} ' |  awk -F "/"  '{print $0; system("ps -fp " $3)} '</code> report actual usage.  The biggest applications? [[mysql]]d, [[java]], [[python]], [[node]], polkitd, [[mongo]]d, [[httpd]]
 +
 +
Strangely, the value for <code>cat /sys/kernel/mm/transparent_hugepage/enabled</code>
 +
<pre>[always] madvise never</pre>
 +
 +
Note that in order to enable or disable THP ''permanently'' (so that it survives reboots), you need to do more than just echo a value to <code>/sys/kernel/mm/transparent_hugepage/enabled</code>. And there are subtle differences between distros. <ref>https://askubuntu.com/questions/597372/how-do-i-modify-sys-kernel-mm-transparent-hugepage-enabled</ref>
  
 
[[Category:System Administration]]
 
[[Category:System Administration]]
 +
[[Category:Memory]]
 +
[[Category:Performance]]
 +
[[Category:Kernel]]
 +
[[Category:Configuration Management]]

Latest revision as of 16:13, 26 July 2018

Media-flash-memory-stick.svg

Python, Linkers and Virtual Memory https://www.youtube.com/watch?v=twQKAoq2OPE

Reporting on "actual" memory usage of your application with smem http://linuxaria.com/pills/linux-terminal-check-who-uses-all-your-memory-with-smem

Transparent Hugepages[edit | edit source]

  • https://access.redhat.com/solutions/46111 for Fedora and RHEL Note: their commands at the end of the article for determining if HugePages are disabled do not work in my limited tests. I have both Ubuntu and CentOS systems which are using HugePages, yet grep -i HugePages_Total /proc/meminfo cat /proc/sys/vm/nr_hugepages and sysctl vm.nr_hugepages all report zero. Meanwhile grep AnonHugePages /proc/meminfo and grep -e AnonHugePages /proc/*/smaps | awk '{ if($2>4) print $0} ' | awk -F "/" '{print $0; system("ps -fp " $3)} ' report actual usage. The biggest applications? mysqld, java, python, node, polkitd, mongod, httpd

Strangely, the value for cat /sys/kernel/mm/transparent_hugepage/enabled

[always] madvise never

Note that in order to enable or disable THP permanently (so that it survives reboots), you need to do more than just echo a value to /sys/kernel/mm/transparent_hugepage/enabled. And there are subtle differences between distros. [1]