3

Hi Everyone – I am planning to upgrade my dual boot Ubuntu 16.04LTS/Win 10 system to 18.04LTS /Win10 and would love some opinions. My main drive is a 1TB SSD and my data drives are 2 8TB HDD’s running in RAID1 configuration. I use Ubuntu chiefly for deep learning research with Tensorflow and Pytorch on large(r) Medical Imaging datasets.

In the 16.04LTS build, I split the SSD 60/40 between Windows/Ubuntu, as I anticipated using Windows more. Of course, that’s not the case, and I have yet to crack 250GB use there. I allocated 100GB to Ubuntu root (/) and have only used 30GB so far.

I made a choice to put /home and /linux-swap on the HDD. Obviously, putting /home on the HDD was a terrible mistake, and has hurt performance on the unit. I plan to fix that in the Ubuntu 18.04LTS install.

Plans are to shrink my Windows ntfs partitions down to 450 GB, and expand the Ubuntu ext4 partitions up to 500 GB, leaving 50GB unallocated. I read that it is helpful not to allocate SSD’s fully as it improves performance / error correction /stability. I’m not sure if that only applies to older SSD’s (mine is a 2 yrs old Samsung 960 EVO, so its part of the newer batch), is fantasy/hearsay, or what.

With the Ubuntu 18.04LTS install I will allocate to the SSD like this:

  1. Dual-boot loaders and Windows 10 – 450 GB
  2. Ubuntu root : 100 GB (is this too much? Especially if installing anaconda and many packages?)
  3. Ubuntu home : 350 GB

I’m going to keep linux-swap on the hard-drive because I have 64GB of RAM. I don’t anticipate running out of memory anytime soon, but with 8TB of disk space, might as well put in the swap partition on the hard drive. Anyone have a strong opinion let me know.

Anyone have any disagreement with what I am doing here or any way to do it better? I’m just a hobbyist in Ubuntu so I would love the opinion of someone who has done many installs and ran Ubuntu linux systems a lot to weigh in.

drsxr
  • 61
  • 6
  • 1
    The overprovisioning isn't necessary, you can use the full capacity. SSDs have the same or better live expectancy than mechanical HDDs. And with 18.04 you don't need a swap partition because it by default uses a swpa file instead. –  Jul 17 '19 at 20:46
  • 1
    I normally allocate 25GB to / (root) and currently use 7GB (and regularly houseclean), but do not have your apps, but multiple others. I normally have several / partitions on both SSD & HDD so I can experiment with settings or configuration. And then keep /home inside / (the 7GB), but all my data is in /data partition (385GB with 76 used) which I mount in every install so I have same data. Do you have good backups, including export of installed apps. – oldfred Jul 17 '19 at 23:19
  • Just to clarify are you planning on upgrading 16.04 to 18.04 or wiping it all out and installing 18.04 fresh? – WinEunuuchs2Unix Jul 19 '19 at 14:11
  • I think with all the Gparted stuff I am going to do its going to be a clean install of 18.04 – drsxr Jul 19 '19 at 21:35

2 Answers2

5
  • 100 GB for / is a lot! Unless you use a lot of huge temp files, this is going to be overkill. 64GB is double of what a typical system needs and I have allocated 48GB because the largest tmp file I ever created was 24GB.

    df --human-readable | grep --invert-match "/loop"
    Filesystem                         Size  Used Avail Use% Mounted on
    udev                               7.8G     0  7.8G   0% /dev
    tmpfs                              1.6G  9.6M  1.6G   1% /run
    /dev/sdb2                           47G   17G   28G  39% /
    tmpfs                              7.9G   92M  7.8G   2% /dev/shm
    tmpfs                              5.0M  4.0K  5.0M   1% /run/lock
    tmpfs                              7.9G     0  7.9G   0% /sys/fs/cgroup
    /dev/sdc1                          932G  461G  472G  50% /media/Data
    /dev/sdb3                          154G  112G   35G  77% /home
    /dev/sdb1                           96M   56M   41M  59% /boot/efi
    tmpfs                              1.6G  116K  1.6G   1% /run/user/1001
    

    Rule of thumb:

    • 16Gb for a minimal system
    • 32GB for the average Joe
    • 64GB for a beefy system
    • More for BFMs
  • Keeping 10% of your disk as "unallocated" is a very good idea: not only because of wear-leveling but because of flexibility: you don't need all that space when your PC is brand new, and that free space is your proverbial spare tire if you ever need to extend one of the other partitions when they run flat! ;-)

  • You can put /home on the SSD and symlink the big files on the HDD.
    E.G. in the above system, /home/fabby/Videos, is actually on /dev/sdc1. Have a look here for the long story, but basically it comes down to:

    # copy all Video files from SSD to HDD
    cp --preserve=all --recursive /home/fabby/Videos /Media/Data/home/Fabby/Videos
    # now delete them from the SSD
    rm --force --recursive /home/fabby/Videos/
    # now create a symbolic link to the right volume
    cd /home/fabby
    ln --symbolic /Media/Data/home/Fabby/Videos Videos
    

    The symbolic link Videos in fabby's home directory is now pointing to /dev/sdc1 mounted on /Media/Data/ in the directory home/Fabby/Videos.

Which means that all of my Documents, Downloads, Music, .. are on my SSD, except the Videos, which are on the HDD.

Best of both worlds! 0:-)

Fabby
  • 34,259
  • 1
    Thx can't upvote yet - agree 64GB should be max necessary if I am at 30GB currently. Symlink info is helpful too. – drsxr Jul 19 '19 at 01:04
  • 1
    Answer edited because of wear-leveling. Also, keeping / and /home separate makes making system backups easier: taking an image of your / with CloneZilla Live is so much faster withtout having to worry about the "Big Data" ;-) – Fabby Jul 19 '19 at 06:54
  • @drsxr I upvoted both you so you'll have points sooner to upvote Fabby who I also upvoted :) – WinEunuuchs2Unix Jul 19 '19 at 13:13
2

Unallocated SSD space for provisioning

Addressing this part of the question:

Plans are to shrink my Windows ntfs partitions down to 450 GB, and expand the Ubuntu ext4 partitions up to 500 GB, leaving 50GB unallocated. I read that it is helpful not to allocate SSD’s fully as it improves performance / error correction /stability.

From: SSD: keep unallocated space?:

Second, most SSDs are overprovisioned internally. Your 256GB SSD likely has something like 256+16GB of actual space in it. The SSD controller hides this from the OS, but it will internally use that extra room when needed.

SSDs can write to free, erased space faster than rewriting existing data. As long as the SSD and OS have TRIM support (all do these days), deleted data will be "erased" and future writes will be fast.

Therefore I wouldn't keep 50GB unallocated. I would allocate it to Ubuntu and increase 450 GB to 500 GB.


Separate /home

I would simply keep 100 GB / and 350GB /home together to lessen chance of either one running out. Similarly I would never have a separate /boot partition.

I keep my /swap in 8 GB SSD partition instead of HDD so it will be faster but it is never used so if ever wanted the space back I could relocate it to nearly empty HDD.

Plans for HDD is to store large windows projects (60 GB). Then in the weeks/months I'm working on a given project it is moved into SSD. After project is over it's moved back to HDD and a different project is moved from HDD to SSD.

  • 1
    Again, commenting because I can't upvote but helpful answer.
    1. SSD is a Samsung 960EVO. Samsung doesn't appear to have built in overprovisioning but I feel confident about boosting the allocation.
    2. Root and /home together so I don't have to worry about it. What a great idea!
    3. Similar workflow with the datasets flowing back and forth from hard drive to SSD.
    – drsxr Jul 19 '19 at 01:09
  • 1
    I have a 2 year old Samsung 960 Pro and it still has 100% life writes left on it. perhaps if our SSDs were 10 years old or they weren't made by Samsung, there might be concern. Final point it is a 512 GB but the drive reserves space for something and you get less than 500 GB to use for yourself. – WinEunuuchs2Unix Jul 19 '19 at 01:47
  • Hah! I disagree with you! (for once! >:-) ). Keeping / and /home separate is a good idea if you make system backups separate from data backups by booting a CloneZilla Live ISO from grub and backing up / off-line from my SSD onto my HDD. The last CloneZilla backup is copied over to the NAS as well as one copy does not constitute a backup :-) ;-P +1 anyway for the swap tip: never thought about doing this myself... – Fabby Jul 19 '19 at 07:07
  • 1
    @Fabby My / which includes all of Ubuntu is 42.2 GB and 50% full so 21.1 GB is used. Imagine if each day I had to resize partitions between / and /home so they each had exactly same percentage free? My $HOME is 8 GB, most of which isn't backed up daily. Indeed my daily backup is selectively from /etc, /boot, /mnt/e/, $HOME which is only 13 MB. HDD is only 5% used and if inclined I can rsync full backups of / daily to it while still using system. Which I might do to show people with SSDs how to use that HDD brick. – WinEunuuchs2Unix Jul 19 '19 at 13:55
  • Holy cow! ;-) – Fabby Jul 19 '19 at 14:05