• Home
  • Tags
  • RSS
  • About
  • clearing caches

    Timestamp:
    Tags: blog

    For benchmarking purposes it makes sense to clear the caches, the linux kernel creates for us. An additional sync beforehand makes sure that everything is committed to disk (dirty objects will not be freed).

    sync
    sudo sysctl vm.drop_caches=3
    

    or

    sync
    echo 3 | sudo tee /proc/sys/vm/drop_caches >/dev/null
    

    This will drop the pagecache, dentries and inodes.