How To: Resize tmpfs
The default CentOS behavior during installation is to create a tmpfs volume with a size equal to one-half the amount of RAM available to the server. This can result in a tmpfs volume that is larger than required for normal operation when ScaleArc is installed on a server with more than 8GB of RAM installed. The procedure below can be used to resize the tmpfs volume.
The procedure below will resize the tmpfs volume as well as make the change permanent for future system restarts.
- Connect to the ScaleArc appliance via SSH (must be enabled in the GUI [Settings] -> [System Setting] -> [System Config])
- Display the current volume information using the df Linux command
[idb@ScaleArc ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda3 95G 8.2G 82G 10% / tmpfs 1.9G 59M 1.9G 4% /dev/shm /dev/xvda1 248M 40M 196M 17% /boot none 100M 40K 100M 1% /data/cache/ramdisk none 500M 4.0K 500M 1% /system/krb5_replay_cache/cid_1 [idb@ScaleArc ~]$
- Determine how much tmpfs space is being used using the du Linux command
[idb@ScaleArc ~]$ du -sh /dev/shm 21M /dev/shm
- Resize the tmpfs volume by remounting it with a new size parameter. Make sure that the size is at least twice as large as current usage.
[idb@ScaleArc ~]$ sudo mount -o remount,size=1G /dev/shm
- Verify the new setting
[idb@ScaleArc ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda3 95G 8.2G 82G 10% / tmpfs 1.0G 59M 966M 6% /dev/shm /dev/xvda1 248M 40M 196M 17% /boot none 100M 40K 100M 1% /data/cache/ramdisk none 500M 4.0K 500M 1% /system/krb5_replay_cache/cid_1 [idb@ScaleArc ~]$ du -sh /dev/shm
- Make the change permanent by editing the /etc/fstab file
[idb@ScaleArc ~]$ sudo vi /etc/fstab # # /etc/fstab # Created by anaconda on Fri Aug 26 09:35:58 2016 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # tmpfs /dev/shm tmpfs defaults,size=1G 0 0 :wq
If you are experiencing issues with ScaleArc or with any of its features, please contact ScaleArc Support. We are available 24x7 by phone at 855 800 7225 or +1 408 412 7315. For general support inquiries, you can also e-mail us at email@example.com.
2901 Tasman Drive Santa Clara, CA 95054 | Email: firstname.lastname@example.org