.chrome/ramdisk directory in your home directory and add the following line to /etc/fstab : tmpfs /home//.chrome/ramdisk tmpfs noatime,nodiratime,nodev,nosuid,uid=1000,gid=100,mode=0700,size=300M 0 0 with the name of your user, uid and gid with his identifiers (you can find them out with the id command), size with the desired disk size. If you have a RAM at least eat a spoon, then the size can be taken and more. A feature of tmpfs is that the specified size will not be backed up in memory - memory will not be wasted at all until you actually write data into the RAM disk. With the df -h command you can always see how full this and other mounted disks are.~/.config/google-chrome and ~/.cache/google-chrome to our disk: cd ~/.chrome/ramdisk mkdir cache config ln -s ~/.config/google-chrome config ln -s ~/.cache/google-chrome cache /etc/opt/chrome/policies/managed/cache-size.json with the following content: { "DiskCacheSize": 40000000, "MediaCacheSize": 30000000 } ~/.config/google-chrome + specified sizes fill the disc by 80 percent. For the size of the first directory is not regulated at all, and DiskCacheSize and MediaCacheSize are not at all rigid boundaries: Chrome can be few exceed if very necessary. At the time of this writing, the RAM disk is used by 83%: $ df -h ~/.chrome/ramdisk Filesystem Size Used Avail Use% Mounted on tmpfs 300M 249M 52M 83% /home/cc/.chrome/ramdisk /etc/systemd/system/chrome-ramdisk.service service: [Unit] Description=Keep Chrome's RAM disk between power-offs [Service] Type=oneshot RemainAfterExit=true ExecStart=/home//bin/chrome-ramdisk restore ExecStop=/home//bin/chrome-ramdisk save [Install] WantedBy=multi-user.target ~/bin/chrome-ramdisk is a simple script that saves a RAM disk to a tar archive or, on the contrary, extracts this archive into an empty RAM disk: #!/bin/bash shopt -s dotglob cd /home/cc/.chrome if [[ "$1" == "save" ]]; then rm ramdisk.tar tar cpf ramdisk.tar ramdisk/* elif [[ "$1" == "restore" ]]; then rm -rf ramdisk/* tar xf ramdisk.tar fi $ sudo systemctl enable chrome-ramdisk.service rc.local, rc.local_shutdown or similar scripts.Source: https://habr.com/ru/post/205158/
All Articles