Skip to content

Instantly share code, notes, and snippets.

@seanorama
Last active August 29, 2015 14:03
Show Gist options
  • Save seanorama/2c2ca9fd5d5dccf93b66 to your computer and use it in GitHub Desktop.
Save seanorama/2c2ca9fd5d5dccf93b66 to your computer and use it in GitHub Desktop.
linux-tuning

Put Chromium/Chrome cache into memory

This method doesn't require messing with Chromium's startup parameters or any configuration outside of /home. I prefer to contain as much configuration as possible to /home such that I can easily move it between different systems/distributions.

mkdir -p ~/System/bin
echo 'export PATH="/home/sean/System/bin:$PATH"' >> ~/.zshrc
# change that to .bash_profile, .profile or whatever your shell uses

cat >~/System/bin/startup-x-chromium-cache.sh <<EOL
#!/bin/sh
rm -rf ~/.cache/chromium
mkdir -p /run/shm/cache/chromium
chmod 700 /run/shm/cache
ln -s /run/shm/.cache/chromium ~/cache/chromium
EOL

chmod +x ~/System/bin/startup-x-chromium-cache.sh
  • Now add the script to start-up at login (using .xsession, gnome-session-properties, or whatever works for your window manager, ...)

Misc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment