Giter Club home page Giter Club logo

nofscache's Introduction

nofscache

A loadable kernel moduel trying to eliminating page caching effects for user applications.

Requirements

  • Linux kernel version >= 4.12
  • Having CONFIG_ADVISE_SYSCALLS=y in /boot/config-$(shell uname -r)
  • This module affects only 64-bit userspace programs since we didn't patch the compatibility version of system calls (compat_sys_xyzzy()).

Installation

git clone https://github.com/ljishen/nofscache.git
cd nofscache
make install

If you keep seeing processes under

[INFO] Checking transition state for module no_fscache (update every 2s)...

[INFO] 2 tasks are not in patched state:
USER       PID   TID CMD
root      1040  1131 /usr/bin/lxcfs /var/lib/lxcfs/
root      1040  1133 /usr/bin/lxcfs /var/lib/lxcfs/

...

You may need to manually kill these processes because they are stopping the module from finishing the transition state from unpatched to patched. See livepatch consistency model for more details.

To uninstall the kernel module, use

make uninstall

Again, you may need to kill processes to help the module finish the transition state from patched to unpatched.

Limitations and Performance Results

See https://ljishen.github.io/nofscache/ for more details.

How to start the Vagrant testing environment

This repository contains a Vagrantfile used to start an Ubuntu 18.04.3 LTS environment for testing.

  1. Download and install Vagrant

    curl -s https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.deb -o /tmp/vagrant_x86_64.deb
    sudo dpkg -i /tmp/vagrant_x86_64.deb
  2. This Vagrant environment uses the libvirt provider. We need to have all the build dependencies installed in order to use vagrant-libvirt

    sudo apt-get update
    sudo apt-get -y install qemu libvirt-bin ebtables dnsmasq-base
    sudo apt-get -y install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev
  3. Add your user to the "libvirt" group. Remember that you will have to log out and back in for this to take effect!

    sudo usermod -aG libvirt $USER
  4. You're ready to install vagrant-libvirt using standard Vagrant plugin installation methods

    vagrant plugin install vagrant-libvirt
  5. Install NFS server since we use NFS to set up synced folders

    sudo apt-get -y install nfs-kernel-server
  6. Start the Vagrant environment

    git clone https://github.com/ljishen/nofscache
    cd nofscache
    vagrant up
  7. Connect to the virtual machine via SSH

    vagrant [-X] ssh

    or via serial console

    virsh console "$(virsh list --state-running --name | grep nofscache)"
    • Use vagrant -X ssh to connect with X11 forwarding enabled.
    • The default user is vagrant with password vagrant. To exit a virsh console session, type Ctrl+].

Troubleshooting

  • If you see something like the following error during vagrant up:

    ==> default: Mounting NFS shared folders...
    The following SSH command responded with a non-zero exit status.
    Vagrant assumes that this means the command failed!
    
    mount -o vers=3,udp,rw,vers=3,tcp,actimeo=2 192.168.121.1:/users/ljishen/nofscache /vagrant
    
    Stdout from the command:
    
    
    
    Stderr from the command:
    
    mount.nfs: access denied by server while mounting 192.168.121.1:/users/ljishen/nofscache

    Try to add this rule to file /etc/hosts.allow

    $ echo "rpcbind: 192.168.121." >> /etc/hosts.allow

    As the default management_network_address used by vagrant-libvirt is 192.168.121.0/24. See management_network_address for more details.

Miscellaneous

nofscache's People

Contributors

ljishen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

qingxianhao joyxu

nofscache's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.