Hi, OpenSUSE user looking to switch to Manjaro this weekend. (Thanks for everyone who responded to my previous thread and questions about graphics drivers.)
I plan on installing Manjaro on a 256GB SSD, and use a 4TB platter drive as /home. (I've also got a 1TB SSD I plan to put games on.) In case it matters, all are SATA; I've got a Z87 Extreme6 MB from a few years back, with no M.2 support onboard.
I'm a little out of the loop on what best practices with filesystems, SSDs, etc. are these days. Should I stick with EXT4? Use Btrfs, ZoL, or something else?
What about swap? I've read that you generally don't want a swap partition on an SSD because it wears it out. Would a swap file be better? I gather it would have the same issues with write frequency, but wouldn't be concentrated on a single small partition. Would I be better off putting a swap partition on the platter drive? Or not bothering with swap at all? What's a good swap size? I've been going with 4GB as a general rule of thumb. (My recollection is that this machine has 16GB of RAM, but I'm not 100% on that and I'm not at home where I can double-check; it's been a few years since I built it, and there's enough RAM that I haven't noticed any issues with it.)
And I know I'll want to set up TRIM, too. Looks like that's just a matter of systemctl enable fstrim.timer, right?
Anything else I should be thinking about that I've missed?
Depending on how you install it (with the installer or using Manjaro-Architect) you'll probably need to remove discard from the fstab. The installer adds it automatically. Manjaro-Architect let's you set it all up yourself, so there's no need.
Other than that @Librewish covered everything else.
Interesting; thanks. I've seen some gripes about Btrfs causing performance issues if there are too many snapshots. Any advice on that? Is there a mechanism for only keeping the most recent n backups, and if so, what's a good n? I expect that with a rolling-release distro, I'll be updating pretty frequently.
I've got my entire system installed on a 1 TB SSD, including /home, and I'm using btrfs for all my partitions, but I must hereby also add that my partitioning layout is more elaborate than what the average user would use.
I am not going to get any deeper into the "why" of it all here as I've already done that on a couple of other threads, but I have separate partitions for the following...:
I also have a 750 GB spinning-rust disk, which has a secondary swap partition on it, and one large btrfs partition with subvolumes that I use for making backups.
But that's just my choice. Most users will opt for the tried-and-tested ext4 as the filesystem type, and for only two partitions ─ / and /home─ besides the swap partition and (if applicable) the EFI system partition or the BIOS partition.
If your system uses a traditional BIOS or has a UEFI which boots in BIOS compatibility mode, and you don't have a GUID partition table (GPT), then you need neither an EFI system partition nor a BIOS partition.
A BIOS partition is an empty partition of a few MiB in size, without a filesystem on it, and it is only needed to store the core.img of the GRUB boot loader if you have a GUID partition table while the system boots in legacy BIOS mode, so as to prevent that GRUB would be overwriting the beginning of the first partition holding actual data ─ in other words, it's just a placeholder.
An EFI system partition is only needed if your machine boots up in UEFI mode, but in that case you will need it regardless of whether your partition table is MBR or GPT. It is a partition that must be formatted with vfat (FAT32) and that will hold the EFI executables for the EFI boot manager.
No, it wouldn't. The Linux kernel does support swap files, but it's a hack, as swap requires that the kernel has access to raw data blocks, and with a swap file, the kernel has to pass through the filesystem layer to get to those blocks. And if you put the swap file on a btrfs volume, then that filesystem cannot be mounted with all the advanced features btrfs offers, such as copy-on-write and compression.
I have two swap partitions, but only one of them is in use, namely the one on the SSD. I've made it 10 GiB in size, and if you're going to be building software from the AUR and it's a pretty big package, then this 10 GiB is no luxury ─ my computer does "only" have 8 GiB of RAM at the moment, but I may upgrade that to 16 GiB in the future. My second swap partition is not active, but it's a 20 GiB partition on the HDD.
If you're going to be hibernating your system, then the rule of thumb is that you take out about 1.5 times the capacity of your RAM, because then your swap partition will have to be able to hold the contents of your entire RAM, plus whatever was already in your swap at the moment that you're hibernating the machine.
Well, it is indeed best to enable the fstrim.timer, because on my system here, Manjaro set up /etc/fstab with the discard mount option for all of my partitions, and using the fstrim.timer instead is much better for performance, plus that with the discard mount option, the underlying device may even refuse to honor the request due to there not being enough blocks to free.
Another thing to correct in /etc/fstab while you're at it, and assuming that you're going to be using btrfs, is to remove the autodefrag mount option for all partitions you have on the SSD, because defragmentation is pointless on an SSD, and all it does is create write amplification, which you don't want.
Additional note: If you're going to be using a separate /usr filesystem, as I am using, then you must make sure that the [usr] hook gets added to the initramfs, which means that you'll have to manually edit mkinitcpio.conf and rebuild the initramfs from within a chroot environment, because Manjaro utilizes a complete /usr merge, which means that there are no binaries anymore on the root filesystem if /usr is on a separate block device, and thus without that hook in the initramfs, the kernel won't be able to find the init process, i.e. systemd.
Hope this answers your questions.
Actually, no, Manjaro is pretty stable, and updates/upgrades are generally bundled together as they trickle down from Unstable to Testing, and from Testing to Stable. There will also always be an announcement about it.
Oh, I see; I was thinking ManjaroWish was a package, I didn't realize it was a spin. Guess I should have taken a closer look at that link.
Looks like a pretty good default selection of packages. Anything else I should know about how it's different from vanilla Manjaro/KDE before I decide which one to go with (besides what you've already told me and what's on the Sourceforge page)?
well sourceforge is where i store iso's
there are lxqt edition and kde edition
the description is very old i have not changed it.
well it differs from default manjaro
theming is different.
extra kwin effects.
cpu governor is set to performance.
zramswap enabled by default.
no tlp as it is root of many problems.
and swappiness = 5
vm cache pressure = 50
and many gaming related tweaks
and many other tweaks which i dont remember that i put in.
well there are tonn of difference between
manjarowish and default manjaro.
well i created a spin cause i did not like some of manjaro defaults and you have freedom to change it.
Since I'm new to Manjaro, I think it might be best if I start with the default installation and tweak it from there. No disrespect; I appreciate your help and your recommendations, I just think it'll be easier for me to get the hang of a new distro if I'm starting from vanilla and making any modifications myself.
If I wanted to set up the tweaks you've recommended -- zram/zswap, btrfs snapshots -- can you recommend a resource for how to get those set up myself?
256 GB is a heck of a lot for a Linux installation on the desktop. I tend to have a / partition of 20-25 GB and it tends to never be fuller than 15 GB no matter what I put in it.
If I were in your shoes I would do a 200 MB /boot/efi (providing you can run EFI, of course), 25 GB root, make the rest of the SSD /home and then symlink whichever of your user folders you think you need four TB for (like video) to the 4TB drive as well as the folder you're going to put games on.
Of course since you obviously have the space, just splitting the SSD between 100 - 300 /boot/efi and a /root is fine :). You wouldn't have to clean your package cache for like 5 years.
Oh and you might consider putting the games on the 4TB drive and use the 1TB drive for backups.
(The reason for the 4TB drive is not that I necessarily need that much space, just that I happen to have a 4TB drive. I thought I needed it for something else -- I thought a hard drive was failing in my HTPC but it turned out to be something else, so I wound up buying a 4TB drive and never using it.)
What you describe is actually more or less how I've had my system set up on OpenSUSE; /home was on the same drive as / , which was only a 120GB drive and still had plenty of space. Media files -- video, music, emulator ROMs, etc. -- went on a 1TB drive (NTFS so I could read the same data from a Windows dual-boot, though I scarcely use that boot anymore so it's probably not worth worrying about being able to read my files from Windows anymore).
I understand why I'd put /boot on a separate partition (per @Aragorn's post), but will I see any major benefit from putting /home on its own partition if it's on the same physical volume as / ? Is that mostly useful in case I need to restore a previous snapshot of the OS but not revert my home directory?
I get the recommendation for 200MB for /boot/efi, but what's a good size for /boot, the parent directory? I remember Ubuntu had a tendency to fill it up with old kernels fast and that was a headache with a small /boot partition; I expect I can spare a couple GB and not miss them.
Well for the separate /home... it won't protect you from drive failure, but it will protect you from a corrupt / broken install or if you want to distrohop. Or just do a clean Manjaro install with a different DE. Just format your Root, use the same user name and all your settings and data is right there. If you combine a separate /home with a backup you are quite set for anything except theft or fires.
I use a very small SSD (only 64 GB) for the Linux OS and still have lots of room to spare, even with a swap partition. The reason I prefer this setup is it ensures I keep my /root and /home partitions quite sparse.
Any large space wasters such as the package cache etc is stored on a platter drive. All large storage directories such as videos are symlinked into my /home directory.
This allows me to make regular images of my OS partition with little time or storage space wasted. I get you may want to use btrfs and might think imaging is totally redundant. Well yes, (it might be) until you suffer a catastrophic btrfs meltdown that you might not be able to recover from.
Btrfs is still experimental in my book. Search the forum and you will find plenty of instances where it has failed. Some of those failures are well documented by one of the forum staff, so this isn't just something that happens to newbs that don't know what they're doing.
I always prefer small OS partitions for quick small backup image creation. Everyone does things differently of course, but that's the way I like to set up my system (and so do many others).
archwiki and manjarowiki is your friend in setting things up everything thing is explained there yiu just have to browse through it.
also as @tbg said you must have at least one backup on external drive
for this you can use snap-sync to take backup on external btrfs drive.
so even if your btrfs is corrupted for some reason you are safe.
What I do is installing everything on the SSD, and just keep the files and apps installed that I need right now or quite frequently. The rest I can get almost instantly, so it really doesn't matter having them on my computer.
SSDs of 500GB have good prize these days, and I don't see how someone will want more. I see that there's a sensible difference when searching and opening documents, so it matters.
Also the swap wear really doesn't matter. Swap is rarely used nowadays, it's there just in case you run out of RAM.
Most likely these days is better to have a swap file than a swap partition, only for just in case.