Jump to content

Seeking A Few Pointers on Setting Up a New SSD


Cluttermagnet

Recommended Posts

Cluttermagnet

Hi, All-

 

After briefly thinking about moving a Linux OS presently on a SATA HDD

to an SSD using Clonezilla or whatever (rsync), I concluded that it's way

more simple to just do a fresh install onto the SSD. I kind of would like to

overwrite with a copy of my present /home partition into the new SSD

/home partition later, however...

 

...but my research at Scot's indicates that I'd really want to set my SSD

up with ext4 filesystem. Trouble is, I have been reflexively installing with

ext3 filesystem for ages. I think I will go with ext4 this time- for the first

time ever, so far as I can remember... I'm using 10-12 year old hardware,

none of the more recent UEFI issues on any of my mobos that I know of-

I can install anything I want on this sort of hardware, and virtually none

of my stuff even has a copy of Windows on board these days. It's

pretty much exclusively Linux...

 

I'm looking for general comments and suggestions oriented pretty much

towards a noob... OK I know a little about Linux, but not near enough...

I use the command line a little bit... mainly I repetitively install Linux Mint.

 

I'm quite comfortable doing partition work using gparted...

 

What would you guys suggest as a good minimum size for Linux these

days for a root and /home partition? I don't do massive movie downloads

or streaming, huge photo saves, or whatever... typically I set up for

maybe 25-30GB root and 25-50GB for /home. BTW the SSD I got

recently (just ordered) is a 128GB.

 

I usually devote any remaining space on a drive to 1-2 big FAT32

partition(s). I find all that Linux permissions stuff just totally aggravating...

FAT32 never hassles me...

 

Thanks, Clutter

  • Like 1
Link to comment
Share on other sites

If it helps here is a shot of my ssd dual booting MX-16/15.

 

UWPSLV6.png

 

As you can see I have doubled the size of "root" as I am trying out new programs and do not always delete them if they are not keepers as I am short of time at the moment.

I think 15 GB is plenty for a "root" for a average user as you can see I used less than 10 GB on MX-15 and at the moment my MX-16 is only at six and a half GB.

 

I normally use the remaining space for "home" as I have an external dock and spare drives for backups and storage. "home" and "root" are usually formatted to ext4 which has never given me any problems.

However I always format drives and partitions which are used by my Windows set up with NTFS and use the ntfs-3g program for linux which has never given me any problems.

 

ntfs-3g information

 

Arch SSD information

 

I have successfully transferred working os's on a hdd to a ssd using Clonezilla or similar program (usually the manufactures own) so if you wanted to do that you should have no problems. However a fresh install is a good idea and should not take much time as long as your internet for updates can keep up with the ssd.

 

If you have obtained a fairly new ssd then you should have no need to fiddle around to get it working. Gparted will set up and make sure your partitions are correctly aligned etc. TRIM should not be problematic but you should do the checks just to be sure.

Basically with modern ssd's it is pretty much plug and play though it does depend on which distro you use as to how much you will have to fiddle around.

 

Have fun and do not worry about the dizzy effects that all that speed will cause :tease:

  • Like 1
Link to comment
Share on other sites

What I have done:

Went with a 128GB SSD and kept the 1TB hard drive for my data.

I did not bother with a /home partition on the SSD; just put everything in /. Then I edited my etc/fstab file to mount the 1TB HDD as /home/ray/datadrive2. I keep all my photos and docs and big downloads like ISOs of other distros on the HDD.

As for swap I put some on the SSD which some folks may think will shorten its life - but I never use it anyway since I have 16 GB of RAM. If you're paranoid you can always put swap on the HDD i suppose.

As far as file format goes I don't have Windows on this machine so I go with ext4 all the way. I think the only permissions thing I had to do was chown -R ray /home/ray/datadrive2 to make sure I could handle all the files in the HDD. And that is a one time thing.

Edited by raymac46
  • Like 1
Link to comment
Share on other sites

V.T. Eric Layton

SSDs? I have not experienced that new technology as of yet. I'm still using drives that whir and click and eventually find the data stored on them. ;)

Link to comment
Share on other sites

SSDs? I have not experienced that new technology as of yet. I'm still using drives that whir and click and eventually find the data stored on them. ;)

 

Modern drives are pretty darn silent these days, are you sure it ain't the grey cell that is whirring and clicking. :harhar:

Link to comment
Share on other sites

V.T. Eric Layton

...are you sure it ain't the grey cell that is whirring and clicking. :harhar:

 

I sure hope they keep whirring and clicking. ;)

Link to comment
Share on other sites

Clutter

Here are a few things to do and Tips on maintaining your SSD.

First. Use EXT4, it is the best for a SSD.

Second Never Ever use BTRFS Never. It will eat a SSD alive with all of it's writes. Ext 4 is the best as it takes care of SSD's

Third Never ever Defrag a SSD that is a good way to ruin one. Most of the newer SSD's take care of that and with EXT4 it is not needed.

Fourth If you can leave a little blank space at the end of the drive about 10 GB if you can spare it. This especially if you have little memory and a cpu without much cache.

Taking care of a SSD, it should last at least 10 years.

Mel

Link to comment
Share on other sites

Hello,

 

Before beginning, I would suggest checking the SSD manufacturer's support web site for any updated firmware and install that.

 

Regards,

 

Aryeh Goretsky

Link to comment
Share on other sites

securitybreach

I really do not have anything to add as everyone basically covered most things. I do the same as some of the others here and use the SSD for the OS and normal sata drives for storage. I have a small /home partition on my SSD and I made symbolic links from my old /home directory on a spinning drive to the small /home partition on the SSD drive. So the /home on the SSD is full of folders that are located on another drive. See:

 

total 3684
-rw-r--r-- 1 comhack users 129 Jan 15 09:20 ~
lrwxrwxrwx 1 comhack users 26 Sep 4 2015 Cerberus -> /old-home/comhack/Cerberus
lrwxrwxrwx 1 comhack users 25 Sep 4 2015 Desktop -> /old-home/comhack/Desktop
lrwxrwxrwx 1 comhack users 27 Sep 4 2015 Documents -> /old-home/comhack/Documents
lrwxrwxrwx 1 comhack users 27 Sep 4 2015 Downloads -> /old-home/comhack/Downloads
lrwxrwxrwx 1 comhack users 31 Nov 13 18:07 KVM -> /old-home/comhack/Documents/KVM
lrwxrwxrwx 1 comhack users 31 Sep 4 2015 Miscellaenous -> /old-home/comhack/Miscellaenous
lrwxrwxrwx 1 comhack users 15 Aug 3 2016 Music -> /Various/Music/
lrwxrwxrwx 1 comhack users 26 Sep 4 2015 Pictures -> /old-home/comhack/Pictures
-rw-r--r-- 1 comhack users 3106 Sep 12 2016 public.key
lrwxrwxrwx 1 comhack users 25 Sep 4 2015 scripts -> /old-home/comhack/scripts
lrwxrwxrwx 1 comhack users 24 Sep 4 2015 Shared -> /old-home/comhack/Shared
lrwxrwxrwx 1 comhack users 19 Sep 11 2016 snes9x-gtk -> /usr/bin/snes9x-gtk
-rw-r--r-- 1 comhack users 695 Apr 20 16:00 space
lrwxrwxrwx 1 comhack users 23 Sep 4 2015 Steam -> /old-home/comhack/Steam

Link to comment
Share on other sites

Hedon James

Clutter

Here are a few things to do and Tips on maintaining your SSD.

First. Use EXT4, it is the best for a SSD.

Second Never Ever use BTRFS Never. It will eat a SSD alive with all of it's writes. Ext 4 is the best as it takes care of SSD's

Third Never ever Defrag a SSD that is a good way to ruin one. Most of the newer SSD's take care of that and with EXT4 it is not needed.

Fourth If you can leave a little blank space at the end of the drive about 10 GB if you can spare it. This especially if you have little memory and a cpu without much cache.

Taking care of a SSD, it should last at least 10 years.

Mel

 

Agree with the first 3, but never heard of the 4th. I won't dispute it....but it sounds like you know something that I do not. What benefit does this provide? Educate me! :rolleyes:

  • Like 1
Link to comment
Share on other sites

securitybreach

Clutter

Here are a few things to do and Tips on maintaining your SSD.

First. Use EXT4, it is the best for a SSD.

Second Never Ever use BTRFS Never. It will eat a SSD alive with all of it's writes. Ext 4 is the best as it takes care of SSD's

Third Never ever Defrag a SSD that is a good way to ruin one. Most of the newer SSD's take care of that and with EXT4 it is not needed.

Fourth If you can leave a little blank space at the end of the drive about 10 GB if you can spare it. This especially if you have little memory and a cpu without much cache.

Taking care of a SSD, it should last at least 10 years.

Mel

 

Agree with the first 3, but never heard of the 4th. I won't dispute it....but it sounds like you know something that I do not. What benefit does this provide? Educate me! :rolleyes:

 

Same here.

Link to comment
Share on other sites

Clutter

Here are a few things to do and Tips on maintaining your SSD.

Fourth If you can leave a little blank space at the end of the drive about 10 GB if you can spare it. This especially if you have little memory and a cpu without much cache.

Taking care of a SSD, it should last at least 10 years.

Mel

 

Agree with the first 3, but never heard of the 4th. I won't dispute it....but it sounds like you know something that I do not. What benefit does this provide? Educate me! :rolleyes:

 

Same here.

Here you go guys and gals and the reason why.

I have taken excerpts from many different sources. I recommend that you read up on SSD’s and how to maintain them, especially in Linux as SSD manufacturer’s don’t have a utility for linux only Windows. My Samsung SSD came with a Maintenance Utility called Magicion for Windows, But won’t work in Linux. If you are like me always installing and testing different Distro’s and OS’s, it may behove you to read up on SSD’s.

Mel

unpartitioned space at the end of a drive is called Overprovisioning, and is unused space on the SSD that is used strictly for housekeeping operations (like wear leveling and bad block replacement).

 

 

Understanding SSD Over Provisioning

 

The most important thing you can do to increase the reliability and performance of an SSD is to over provision some space at the end of the drive. This simple task is often overlooked, ignored, or plain misunderstood. Over Provisioning is leaving raw unpartitioned space at the end of the drive so that the SSD controller can remap data from worn memory cells on the SSD hard drive. Samsung recommends a 10% over provisioning rate so on a 250GB SSD drive you should have 23.85GB of OP space reserved. SSDs only have a limited amount of writes before they start to fail

The Below URL is for Ubuntu and Mint, but applies to other Linux Distro’s as well.

 

  • Like 1
Link to comment
Share on other sites

https://www.reddit.com/r/linuxquestions/comments/50kptt/best_ssd_for_linux/

 

Unless you're using this for a database that's actually intensive, don't worry about overprovisioning beyond how the drive comes from the factory. You will NOT have any issues with endurance for any general use. Seriously.

Source: I do SSD performance testing for one of the big SSD manufacturers. Even testing database applications at levels that will never be run in production I can't get close to the endurance levels unless I specifically tune the configuration to do so.

2nd: Linux will handle everything fine from the big vendors (Samsung, Intel, Micron, Sandisk, Toshiba, SK Hynix, Crucial)

3rd: Instead of using overprovisioning to improve endurance, use fstrim. Mount with the "nodiscard" option and set a cron job to run fstrim at night. You can usually just use "discard" on any current generation drive but the nodiscard + fstrim will work with past gen drives as well.

 

The writer links to this site which seems to be quite knowledgeable about storage needs.

 

http://forums.storagereview.com/index.php?/topic/38258-samsung-850-evo-overprovisioning/

 

 

:whistling:

Link to comment
Share on other sites

Here are a couple of articles regarding fine tuning of a ssd. They are well worth a read.

 

http://www.linux-mag...ning/(offset)/6

 

http://www.linux-mag...-SSD/(offset)/6

 

Over-Provisioning

 

All SSDs have a spare area, that is, a reserved data area that is not directly visible to the operating system, which the SSD uses internally for the wear leveling and bad-block replacement, as well as read, modify, and write operations.

 

 

 

relatime, lazytime, and noatime

 

The noatime option is no longer considered a must-have for SSDs. On Linux, each file operation updates the access time (atime) of the file. The noatime mount option omits this step, thus saving write ops. But some programs rely on an atime update and do not work with noatime. Two new mount options therefore combine performance with functionality and make noatime superfluous: relatime became the default setting in kernel 2.6.30. The relatime option tells Linux to only update the atime if the file has changed. lazytime is a new option in kernel 4.0. lazytime keeps updates in RAM that are flushed later along with other changes.

 

 

As of kernel 2.6.33, Linux also has a TRIM command. The TRIM command tells the SSD controller which blocks it can skip from the operating system's point of view. The contents are thus no longer replicated, which accelerates write access to the drive and also enhances the lifetime of the storage medium. The memory controller tries to spread writes as evenly as possible over the SSD storage area. Wear leveling [5] ensures that the memory blocks are evenly worn, thus ensuring a longer service life for the disk

 

 

 

The noatime mount option is also important. Linux typically records the last file access time. This additional step of recording the access time means each read also leads to a write. This procedure is anything but beneficial for the SSD's service life. Therefore, you should specify the noatime mount option to avoid logging the access time. Alternatively, use the relatime option to only save the access time if the last access time was before the last file modification time.

Another mount method, lazytime [6], is planned for the next development branch (3.19) of the Linux kernel. The lazytime technique will store access times in RAM and therefore make this step of disabling logging unnecessary.

 

 

If your swap space is on the SSD along with the data partitions, you need to ensure correct trimming for swap. However, online discard can also cause performance degradation for swap partitions. In kernels later than 2.6.36, TRIM is therefore optional for swap partitions. You need to enable it manually using the swapon --discard option or via the fstab file and the discard mount option. This option always executes a discard when you mount the swap space, which should be quite sufficient for normal computers that only need to swap out memory from time to time.

 

 

Avoiding unnecessary write cycles helps prolong the life of the SSD. One way to avoid writing to the disk is to transfer parts of the filesystem into memory using a tool such as tmpfs.

Good candidates for relocating to memory are directories such as /tmp, /var/spool, /var/tmp, and sometimes /var/log. In the case of /var/log, you need to decide whether you need persistent logs or whether you are OK with discarding the log information when you shut down the computer.

 

 

 

 

Setting up a ssd for linux really depends upon what sort of ssd you have older/modern new/secondhand which distro you are running with which kernel you are running and what you are doing with your pc. So to make the best of a ssd you still need to reaserch a tad.

 

:whistling:

 

An lastly

 

Kernel 3.17 comes with a new mechanism for SSDs connected via SATA. The kernel completely avoids the conventional block I/O layer and thus the scheduler and its weaknesses. This new mechanism is Multi-Queue Block I/O Queuing (blk-mq), which was implemented for device connections via PCIe in kernel 3.13 [8]. This mechanism did not result in any adverse effects in a two-month endurance test.

You can enable BLK-MQ without having to recompile the kernel.

 

Although much tedious configuration might have been necessary a few years ago to set up an SSD on Linux, today you do not have to worry. State-of-art Linux distributions are well integrated with SSDs. You only need to intervene if you want to squeeze out the last bit of performance.

 

A current Linux kernel comes with everything you need for optimal operation of an SSD.

 

:whistling:

Edited by abarbarian
Link to comment
Share on other sites

There is a lot of misinformation on the Internet. I for one will follow what the manufacture of my SSD's says. Which is Samsung and my ssd's are Samsung. They have a Maintenance Utility for windows that does the trim and all, but none for linux. I only leave a 10 GB space at the end of my SSD's instead of 10 percent, because of trim and the things in the kernal that take care of SSD's in Linux. SSD's are to expensive to not keep them maintained the way the manufacture states. Just my 02 cents worth.

Mel

Edited by mhbell
Link to comment
Share on other sites

Most (all?) SSDs have some overprovisioning built in which doesn't show to the operating system. Extra user-defined overprovisioning may be superfluous, or not depending on use case.As I mentioned above, TRIM should be run regularly but the discard option is too intensive. You can run fstrim weekly with a cron job, or if you have a Debian system with systemd it's a simple .timer unit setting. To activate run:

# cp /usr/share/doc/util-linux/examples/fstrim.{timer,service} /etc/systemd/system
# systemctl enable fstrim.timer

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...