Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PCIe NVM SSC - Maximising Benefit
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 424
Location: Wales, UK

PostPosted: Sat Jan 18, 2020 2:20 pm    Post subject: PCIe NVM SSC - Maximising Benefit Reply with quote

Good afternoon all! I have a 1TB SSD which I have mounted on an PCIe adaptor and fitted to my aging desktop PC (Core i7, first generation). Based on my observation, I can speed up this PC by improving the disk throughput, something the SSD should deliver. However, I understand I cannot boot of the SSD (I might be wrong on this point...). I have currently partitioned and formatted the SSD as one partition, but that can be easily changed. If I wanted to make best use of this drive, I am planning:
  • Move the partition / over to the new drive, other than /boot
  • Leave /boot on the existing hard drive
  • Create a second partition, and move /home over. Currently /home is on a second HD
  • Create a swap partition on the SSD

Is there anything I need to be particularly careful of when doing this? For example, currently I have the kernel drivers for the SSD compiled as modules - do I need to to build them into the kernel directly? Or is it simply a case of clone the contents over to the new partitions, modify /etc/fstab then reboot?

Thanks for your support!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14724

PostPosted: Sat Jan 18, 2020 4:51 pm    Post subject: Reply with quote

Whether you can boot from the drive depends on whether your firmware can access it to read the kernel and initramfs. I have a system that boots directly from an NVMe drive, but it is attached through an M2 slot on the motherboard, not through a PCIe adapter. Your firmware may or may not be able to access the NVMe drive through your adapter. I suggest you try it and see if you can get it to boot directly. The most likely failure mode is just that it cannot access that disk, so you go back to the plan you proposed above.

I would include the kernel drivers for the SSD directly in the kernel. You know you will use them constantly when the system is up, and never boot the system without them, so making them modules just adds complexity for no benefit. If you want them to be modules, you need to arrange for the kernel to load them before it tries to access the SSD. Normally, modules are stored on the root filesystem, and since your root filesystem will be on the SSD, that would create a dependency loop. You could break the loop by putting the modules in an initramfs, but that is more trouble than building them into the kernel.
Back to top
View user's profile Send private message
nvaert1986
n00b
n00b


Joined: 05 May 2019
Posts: 56

PostPosted: Mon Jan 20, 2020 12:14 pm    Post subject: Reply with quote

Can you share your brand and type of motherboard? It depends on whether the SSD / PCI-E adapter is using the AHCI or NVME protocol (from what I understand from you it's NVME). Here it depends from what year your motherboard is, but older motherboards lack the NVME EFI firmware, so are unable to boot frome a PCI-E based NVME drive. If your motherboard supports NVME however, a PCI-E based adapter should work too, as it's usually the same protocol.

Another interesting read is: https://www.win-raid.com/t871f50-Guide-How-to-get-full-NVMe-support-for-all-Systems-with-an-AMI-UEFI-BIOS.html It basically explains to you how you can integrate EFI drivers into your motherboards existing (AMI) BIOS. Re-flash it and your motherboard will be capable of booting from a NVME drive.

NOTE: Flashing your BIOS with (modded) firmware is obviously at your own risk. :P
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 424
Location: Wales, UK

PostPosted: Sat Jan 25, 2020 2:12 pm    Post subject: Reply with quote

Hi All - thanks for the comments. I have transferred everything over, from the old / partition and the /home drive to partitions on the new drive. I have left /boot on the original HD - the motherboard doesn't boot of the nvme drive directly, and to be honest, I suspect this year will see the guts of this computer ripped out and replaced so I am not in a hurry to reflash the bios etc!
I did include the NVMe driver code directly into the kernel, and I also had to update the grub configuration to reflect running with root on the new drive, even though I had updated /etc/fstab

So now all good - a bit quicker than before particularly when opening applications and saving stuff (as expected). Compiling firefox was about 5% quicker than before (but still 19 minutes!).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum