You are not logged in.
Good morning at all
I have ascii installed on a HP 250 G4 Notebook PC (L8C20EA#ABZ) on this ssd disk
product: SanDisk Ultra II
bus info: scsi@0:0.0.0
logical name: /dev/sda
version: 20RL
serial: 174204A05CE4
size: 223GiB (240GB)
capabilities:
GUID Partition Table version 1.00,
Partitioned disk,
GUID partition table
configuration:
ansiversion: 5
guid: 660071fd-6b8a-49cb-acf7-52ee4eb5dd6d
logicalsectorsize: 512
sectorsize: 512
this is fstab:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=16b7b95b-55ff-4b21-8b87-fad6724894bf / ext4 noatime,errors=remount-ro 0 1
cache-chromium /home/pierlo/.cache/chromium tmpfs defaults,noatime,mode=1777 0 0
# temp e log su RAM
tmpfs /tmp tmpfs defaults,noatime 0 0
tmpfs /var/tmp tmpfs defaults,noatime 0 0
tmpfs /var/log tmpfs defaults,noatime 0 0
# /boot/efi was on /dev/sda1 during installation
UUID=8947-A6AB /boot/efi vfat umask=0077 0 1
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
(I have no firefox)
Sistem is very fast.
The only problem is that i can not append "discard" on root fstab line because mate-panel freeze so I have to trim at hand with "fstrim -v /"
Have you any suggestion for my ssd config?
Last edited by pierlo (2019-02-05 08:26:54)
Offline
you could read some tips here : https://wiki.debian.org/SSDOptimization
wiki page says discard is not really needed and provides this link for justification : https://www.spinics.net/lists/raid/msg40916.html
Offline
I'm not sure I understand the problem, but maybe this link below will help??
Offline
discard is not needed but then you have to run the fstrim command (from util-linux
package) on your ssd weekly. The easiest way is to put an executable script in /etc/cron.weekly with this command :
/sbin/fstrim --all || true
Last edited by thierrybo (2019-02-02 15:36:36)
Offline
Thank you at all.
I will put the fstrim script in cron
My put some othr partition on tempfs?
I have 8GB of RAM.
Thank again
Offline
You can configure /tmp as a tmpfs in /etc/default/tmpfs.
Geoff
Offline
I uncommented this line
RAMTMP=yes
of etc/default/tmpfs
Is the right way?
Thank
Mount output
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=4038308k,nr_inodes=1009577,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=809924k,mode=755)
/dev/sda2 on / type ext4 (rw,noatime,errors=remount-ro,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
pstore on /sys/fs/pstore type pstore (rw,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1619840k)
cache-chromium on /home/pierlo/.cache/chromium type tmpfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,noatime)
tmpfs on /var/tmp type tmpfs (rw,noatime)
tmpfs on /var/log type tmpfs (rw,noatime)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,relatime,net_prio)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,relatime,pids)
cgroup on /sys/fs/cgroup/elogind type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/elogind/elogind-cgroups-agent,name=elogind)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=809920k,mode=700,uid=1000,gid=1000)
Last edited by pierlo (2019-02-05 08:24:25)
Offline
Yes, that is the way to do it. There is a comment in that file, that this causes /tmp to be mounted earlier than /etc/fstab is read.
Geoff
Last edited by Geoff 42 (2019-02-05 09:49:36)
Offline
Thnk you again.
Any other suggestion for SSD optimization is appreciated
Offline
The main trick was to not use discard and use fstrim instead. Other than that, the other main advice from early ssd days was to avoid writing too often to the ssd.
I think this is not an issue anymore with modern ssds, however I still put /tmp/ to use ram as you did, and I still use a dedicated /var/ partition on an hdd, as /var/ and /tmp/ are the partition that use more write cycles.
By the way my /home/ partition on not on ssd, so I use symlinks to put my steam and playonlinux games that need disk speed.
Offline
Any other suggestion for SSD optimization is appreciated
use a dedicated /var/ partition on an hdd
I have been setting up bind mounts today for a new system I purchased recently. I have my notes right in front of me so a simple copy and paste will explain how I did this is ceres, beowulf, ascii, and another distribution.
I prefer to use bind mounts instead of a separate partition because it reduces the number of partitions on a drive. This method is pretty simple and quick. It can also be used to create a bind mount folder for /tmp, if you wish.
- Create the folder that you want to bind to. Example:
mkdir /mnt/Data/bind-mount-folder/var && /mnt/Data/bind-mount-folder/tmp
- chmod the newly created tmp folder to 0777:
chmod 0777 /mnt/Data/bind-mount-folder/tmp
- Copy contents of the /var folder to the place you designate:
rsync -avzh /var/* /mnt/Data/bind-mount-folder/var && rsync -avzh /tmp/* /mnt/Data/bind-mount-folder/tmp
- Rename Original folders to save their contents.
mv /tmp /tmp.original && mv /var /var.original
- Create new folders to serve as mount points:
mkdir /tmp && mkdir /var
- Edit fstab with:
/mnt/Data/bind-mount-folder/var /var none bind 0 0
/mnt/Data/bind-mount-folder/tmp /tmp none bind 0 0
I suggest to be sure to put the bind entry in fstab below the mount entry for the destination location. The second drive location (Data) must be mounted before the "bind mount" location.
- Mount the bind folders:
mount --bind /mnt/Data/bind-mount-folder/var /var && mount --bind /mnt/Data/bind-mount-folder/tmp /tmp
The nicest thing that I like about bind mounts is that the mounted folders and their contents will be included in backup functions like refractasnapshot.
reboot
This just worked for two linux distributions, devuan and pclinuxos. If this fails for any reason the system will not be bootable, as /var (and /tmp files) will need to be created. Be sure that you have a live disk, or another boot method, to rename the original folder(s) and the system will be bootable again.
But like you mentioned, it may be less important today to reduce write functions on a newer solid state drive.
Last edited by nixer (2019-02-26 11:48:19)
Offline