I recently bought a 240 GB SSD to speed up my computer with 1 TB HDD. I dual boot Windows and Linux. I want to use my new SSD in the most effective way. Reading through many sites led me to conclusion that, for Linux, bcache is the way to go. I want to make sure that my understanding of bcache is correct.
So, I wanted to put commonly used data on SSD and rest on HDD. However I play games on both Windows and Linux, so 240 GB is not quite enough for both (I also use several programs, that use several gigabytes of space). So I wanted to partition my SSD in two ~120 GB partitions, one for Intel Smart Response (for Windows) and second for caching partition for bcache. Now, here is what I've gathered about bcache:
- Bcache acts as a layer between HDD and RAM
- I can have many backing devices/partitions (that are on HDD) that are cached by caching partition (on SSD). Their size may be larger than caching partition.
- Recently read data is put on SSD for later use
- I mount only caching device and not any backing partitions and see files, that are on those backing partitions
- Converting existing partitions to be used as backing partitions for bcache is troublesome but possible
- Resizing backing partitions is also possible but troublesome
Now here are my questions:
- Is my knowledge about bcache correct?
- Sequential I/O is ignored by bcache. How does it work with loading games?
- Can I shuffle my partitions or move their beginnings? (does bcache use UUID or /dev/sdxx when selecting partitions?)
- I read, that it's not recommended to put partitions such as /tmp or /var on SSD, because constant read/writes will wear the SSD. Should I have those on separate partitions and not set them as backing partitions?
- What about swap? Should I put it on SSD?
- Is there any other solution, that would suit my needs better than bcache?
Last one is a little bit complicated. I tried to set up pci passthrough of my GPU to windows guest. I managed to boot in vm the system, that I have normally installed on my hdd. So I can boot same windows either natively or through VM. Since I wanted to make minimal changes to hardware that is seen by Windows I passed through entire HDD to VM. Windows only uses its NTFS partitions and my Linux uses remaining ones. Will there be any problems with bcache and that setup?
For the record, I use elementary OS (based on Ubuntu 16.04).