Memlockd

5 Comments

Memlockd is a daemon that locks files into memory. Then if a machine starts paging heavily the chance of being able to login successfully is significantly increased. The default configuration will lock all the files needed for login to a Debian GNU/Linux system via the console or via ssh.

5 thoughts on “Memlockd”

  1. yannis says:

    Hello,

    Is it possible to run memlockd on CentOS 7?

    Downloaded memlockd_1.1.tar.gz, extracted it and then did ‘make’.
    Then copied memlockd on /etc/init.d and memlockd.cfg in /etc but it does not seem to run when I give /etc/init.d/memlockd -c /etc/memlockd.cfg .

    I get the following in logs:

    Recursion, entering “/etc/memlockd.d”
    Can’t stat “/etc/memlockd.d”

  2. yannis says:

    it seemed that I just needed to create the folder /etc/memlock.d

  3. Norman says:

    I installed memlockd and I am satisfied that what I tell it to load it does. My problem is that I told it to load my desktop wallpapers and saw a jump in cache size – good.
    I then repetitively changed the wallpaper and the disk gets busy and I was expecting all the wallpapers to come out of cache memory.

    Debian 8.8.0 with KDE Desktop.
    kernel 3.16.43-2+deb8u2.

  4. etbe says:

    Norman, what exactly is the problem here? Memlockd is supposed to lock everything in RAM and it sounds like it was doing that. It’s probably a bad idea to do that for wallpapers as your system should give better performance on average if they can be paged out. The aim of memlockd is to allow you to login as root to recover from a problem in an emergency, but of course I know that people will do things I didn’t plan for. ;)

  5. Norman says:

    Yes, wallpaper is not the best use for memlockd, but it shows a flaw in the system. The wallpapers should be coming out of the cache and not off the hard disk.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.