1

I have 120 GB SSD and 2TB HDD. Now I just wondering how to get best performance.

1st option is to install system on SSD and home to HDD. I have that in my laptop and works nice. But it take only 10% SSD into use and other does nothing.

2nd option seems to be to install bcache. In that manner complete SSD is used and even files on home can gain speed. But If I understand correctly for bcache I need 3 drives?!?

To clarify usage. I'm work with electronics so I do download a lot of datasheets and manuals, but not the movies. In my work I made changes in a lot of files and create / move / rename a lot of files. I do browse a lot, and have a lot of emails stored locally (thunderbird/firefox). I need reliable and safe system. With same hdd running over 6 years I don't have any issue. I'm affraid that sdd is not so secure.

So what is better option and does bcache really need 3 disks?

eSlavko
  • 163
  • It depends on how you use system. Very little downloads will not require much space, downloading a lot of videos, you might not have enough space. Extra free space is a lot nicer than too little. Having root on SSD is nice, but usually don't need or notice the extra speed for looking at downloads. Free space on drive can be use for dual booting. – crip659 Nov 09 '20 at 21:55
  • I'd put everything on SSD (including /home) and store downloaded files on the HDD. Now, do you see the problem with your question? Different people have different uses. There is no 'better option', there's just the best option for you. – KGIII Nov 09 '20 at 22:42
  • Does this answer your question? Do I need Intel Smart Response when installing Ubuntu? See the original part of the accepted answer. even though the question is old I think this answer is still applicable for you. – user68186 Nov 10 '20 at 00:10
  • 1
  • I do some more clarification in original post. I believe that if I have root on sdd and home in hdd, the system should be reliable as sdd is mostly read and have a lot of space for wear leveling. But having home on ssd will spedup little more. – eSlavko Nov 10 '20 at 08:28
  • 1
    Based on your edit to the question, you need a good external backup system. A 6 year old HDD is waiting to breakdown soon. This is not related to your question though. – user68186 Nov 12 '20 at 16:03
  • The HDD and SSD are new. The running ones are that old. And I do have backups – eSlavko Nov 13 '20 at 08:28
  • The most dramatic difference between HDD and SSD performance is "random read" speed. That's when lots of files in different areas of the disk need to be read at once. You basically want everything on your SSD that gets referenced often - your OS, all software and /home (because of configs). Your static files that are usually called on demand and can be read linearly can be on the HDD - movies, music, documents, etc. – Nmath Nov 26 '20 at 06:02

2 Answers2

0

1st option is to install system on SSD and home to HDD.

No I would not do that.

Use the SSD as the boot device and for /home. /home benefits from the SSD because all the configuration files are there.

Edit ~.config/user-dirs.dir to change the personal directories to you HDD and set all software, like browsers, to store downloads there. Video's and music do not benefit from an SSDs speed that much.

  • ssd: / 20Gb is enough for a desktop. More if you want to use servers. Or the whole 120 if you don't care about it (and not even make a seperate /home)
  • ssd: /home 5Gb is enough if you want it (you are not using it anyways and only need it for the configuration files). More than 10Gb can be overkill depending on usage.
  • hdd: /{mountpoint/} the whole 1Tb. When you reinstall you have it easy too: you format the ssd and mount the hdd.

You could leave the 95Gb on the ssd empty and use it for a 2nd, 3rd, 4th OS when you feel like installing more than 1.

Rinzwind
  • 299,756
  • Installing all into SSD and have mountpoint to HDD seems nice. As near all my work is already stored in ~/projects that is easy to setup. But SSD will be used only around 10% and some files I have in ~/projects will have slow access (compiling multiple source for example). With bcache seems that I can get speed boost for any file. Do I miss something here? – eSlavko Nov 10 '20 at 08:55
  • Btw I don't use dual boot!. But I use VirtualBox for that. (and keeping vdi cached on ssd should be fine too) – eSlavko Nov 10 '20 at 08:59
  • @eSlavko "compiling multiple source for example:" an ssd will not matter for cpu heavy tasks but will if you need to write a lot. writing a lot is bad for an ssd so try to have that done in 1 go as much as possible. So yes all all parts of these 2 comments. – Rinzwind Nov 10 '20 at 12:28
  • I did have a lot of small writes on system so definetly bad for ssd. But like to have ssd gain from these folder too. From that I'm little biased now to use bcache (in 'writearound' aka read-only cache) I think I really don't need the write cache at all. – eSlavko Nov 10 '20 at 13:12
  • If youl use backups and have a new ssd at the ready who cares about the write to an ssd ;-) – Rinzwind Nov 10 '20 at 13:48
  • The SSD is too small to host all my files. So I need HDD too. I don't care for photos and similar. Seems that best will be if try both options and choice the best one. (or keep the 1st try if allready works well) – eSlavko Nov 10 '20 at 16:48
0

You can probably enable Bcache with only one drive, but there wouldn't be any point. The Bcache homepage states:

Bcache is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives.

Based on this, it seems the requirements are "one or more... solid state drives" and "one or more slower hard disk drives". So the minimum number of drives needed are two.


If not dual booting:

  • EFI = 1-2GB on SSD. Why not smaller? It's a pain to deal with partitions that are too small. A couple GB won't be missed.
  • / = 32GB on SSD. Why not smaller, like 20GB? Smaller would have worked for 32-bit systems, but after the transition to 64-bits, I've had systems take up ~18GB for root. Dealing with partitions that are too small is a pain.
  • swap = RAM + 2GB on SSD. This is mainly for hibernation. If you'd rather use swap files, make / even larger.
  • bcache = 16-32GB on SSD? I don't know. It's up to you.
  • /home = Remainder of SSD. Why separate /home? User-specific settings are easier to preserve if the system has to be reinstalled.
  • /mnt/data = entire HDD. Then bind or symlink folders into home directory – Download, Pictures, Videos, etc.

If multi-booting:

  • Carve out space on the SSD for other operating systems. MS Windows needs 50-64GB to function. Updates won't work if there isn't enough space.
  • Maybe include 1-2GB /boot partition on SSD. This seems to be most useful if you intend to boot multiple Linux distros.
  • Format HDD in file system that can be used by all OSes, or make a transfer partition.

For VMs:

  • It may be possible to create a COW disk image on the SSD that is based on another disk image located on the HDD. The COW image acts as an intermediary that speeds up writes and some reads. This arrangement may improve the overall performance of the VM.
xiota
  • 4,849
  • I missread the manual. Indeed the 3 drives are needed to setup bcache. Working HDD and backing SDD. The third is the system running to prepare bcache. I miss that running system can be live CD / USB stick. I did give try to bcache. For the 1st day of work seems all ok. And as caching mode can be changed in live system I did tri different option and difference is HUGE. – eSlavko Nov 13 '20 at 08:32
  • You need three partitions, but they could all be on the same drive if you wanted. – xiota Nov 13 '20 at 09:11
  • but this doesn't make sense. Now running bcache and all seems to be nice. Even VMs works really good. At 1st start of VM the thing is little slow (like using only HDD) but on subsequent run the boost is huge. – eSlavko Nov 13 '20 at 14:40