{"id":5469,"date":"2015-12-21T12:50:30","date_gmt":"2015-12-21T04:50:30","guid":{"rendered":"http:\/\/rmohan.com\/?p=5469"},"modified":"2015-12-21T12:50:30","modified_gmt":"2015-12-21T04:50:30","slug":"bloging-on-open-sourcelinuxbsd-and-internet-world-what-is-devshm-and-how-to-mount-devshm","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5469","title":{"rendered":"Bloging on Open Source,Linux,BSD and Internet World What is \/dev\/shm and how to mount \/dev\/shm"},"content":{"rendered":"<p><strong>What is \/dev\/shm and how to mount \/dev\/shm<\/strong><\/p>\n<p><strong>Introduction:<\/strong><br \/>\n\/dev\/shm is nothing but implementation of traditional shared memory concept. It is an efficient means of passing data between programs. One program will create a memory portion, which other processes (if permitted) can access. This will result into speeding up things on Linux. shm \/ shmfs is also known as tmpfs, which is a common name for a temporary file storage facility on many Unix-like operating systems. It is intended to appear as a mounted file system, but one which uses virtual memory instead of a persistent storage device. If you type mount command you will see \/dev\/shm as a tempfs file system. Therefore, it is a file system, which keeps all files in virtual memory. Everything in tmpfs is temporary in the sense that no files will be created on your hard drive. If you unmount a tmpfs instance, everything stored therein is lost. By default almost all Linux distros configured to use \/dev\/shm.<\/p>\n<p><strong>Useage:<\/strong><br \/>\n\/dev\/shm is used to improve the performance of application software for eg. Oracle.<br \/>\nGenerally speaking, IO intensive tasks that benefit from fast, No-HDD-read\/write-space, such as video encoding, gaming, etc. can make extensive use out of shm.<\/p>\n<p><strong>Commands:<\/strong><\/p>\n<blockquote><p>For temporary mounting-<br \/>\nmount -o remount,size=5G \/dev\/shm<\/p><\/blockquote>\n<blockquote><p>For permanent mounting,paste the below given bolded line in \/etc\/fstab:<\/p>\n<p>#vi \/etc\/fstab<\/p>\n<p><strong>none \/dev\/shm tmpfs defaults,size=5G 0 0<\/strong><\/p>\n<p>save and close the \/etc\/fstab file.<\/p><\/blockquote>\n<blockquote><p># mount -o remount \/dev\/shm<\/p>\n<p>&amp; Verify the mounting.<br \/>\n# df -Th<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>What is \/dev\/shm and how to mount \/dev\/shm<\/p>\n<p>Introduction: \/dev\/shm is nothing but implementation of traditional shared memory concept. It is an efficient means of passing data between programs. One program will create a memory portion, which other processes (if permitted) can access. This will result into speeding up things on Linux. shm \/ shmfs [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,17],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5469"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5469"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5469\/revisions"}],"predecessor-version":[{"id":5470,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5469\/revisions\/5470"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}