On 09/18/2017 06:23 AM, Carlos E. R. wrote:
Hi,
I need more ram than my 8GiB, but my board doesn't allow it. I use swap, but Leap is very slow when swapping; I have the feeling that it is slower than other releases.
So I wonder if there is some type of small hard disk that can be used for fast swap. SSD? Would it wear out? SSD is typically slow at writing.
A RAM based "disk"? No need for battery backup, unless to keep the format. Does it exist?
-- Cheers
Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Another few points to consider Carlos: Sometimes you think you are using swap, but you check and find out that the machine is set up by default to resist swapping until it gets desperate for memory. This has been the trend lately but it is a silly default when you have swap on an SSD. I'm currently running 42.2 on a laptop limited to 4gig. I crank up the swappiness (60) and crank down the cache pressure (50). I WANT it to swap. I want it to swap early and often. Its using 4 gig of memory with a 6gig swap on SSD in a dual core machine. Sometimes running VMs I'm using more swap space than I am real memory. Its fast as hell. In /etc/sysctl.conf vm.swappiness = 60 vm.vfs_cache_pressure = 50 I make much more use of swap this way than with the default settings. Now about your worry regarding write to SSD.... Yes write is slower than read. But only because Read is so blindingly fast. Writing on ssd is light years ahead of HDD write speeds. You can only call it slow when viewed in comparison to the same SSD's read speed. So don't be afraid to write on your SSD, and don't be afraid to use the hell out of your SSD. You will send the machine to recycle long before your ssd wears out. Another possible source of slowness: discard option in fstab. You want to remove that from every partition in fstab that sits on ssd. Instead use systemd's fstrim.timer. sudo systemctl enable fstrim.timer sudo systemctl start fstrim.timer sudo systemctl status fstrim.service This will trim you drives once a week (which is plenty) rather than inserting trim operations after ever file delete operation. Discard in the fstab entry can make the machine "feel" slow and causes excess SSD access. One recommendation for swap on ssd (or any partition on ssd) is to over provision, provide more space than you actually need so as not to force trim operations for space recovery. Ned 8 gig? then partition for 10. Some links I've found on this subject: http://www.linux-magazine.com/Issues/2016/187/SSD-tuning Somewhat dated: Mostly from Ted Ts'o who knows a thing or two about file systems: https://thunk.org/tytso/blog/2009/02/22/should-filesystems-be-optimized-for-... Newer post by Ted Ts'o on this: https://forums.freebsd.org/threads/56951/#post-328912 Also Less specific: https://arstechnica.com/gadgets/2015/04/ask-ars-my-ssd-does-garbage-collecti... ArchWiki also recommends against discard: https://wiki.archlinux.org/index.php/Solid_State_Drives Also, (side issue nothing to do with swap) btrfs is not really optimized for ssd. https://btrfs.wiki.kernel.org/index.php/FAQ#Is_Btrfs_optimized_for_SSD.3F -- After all is said and done, more is said than done.