1 |
Hello, Adam. |
2 |
|
3 |
On Mon, Mar 20, 2017 at 17:09:15 +1100, Adam Carter wrote: |
4 |
> > That, indeed, seems to to be the case. When I do cat /proc/interrupts | |
5 |
> > egrep '(CPU/nvm)', I get just the header line with one data line: |
6 |
|
7 |
> > CPU0 CPU1 CPU2 CPU3 |
8 |
> > 17: 0 0 15 14605 IO-APIC 17-fasteoi ehci_hcd:usb1, nvme0q0, nvme0q1 |
9 |
|
10 |
> > I'm kind of feeling a bit out of my depth here. What are the nvme0q0, |
11 |
> > etc.? "Queues" of some kind? You appear to have nine of these things, |
12 |
> > I've just got two. I'm sure there's a fine manual I ought to be |
13 |
> > reading. Do you know where I might find this manual? |
14 |
|
15 |
|
16 |
> Can't remember where i read up on this. Might have been troubleshooting |
17 |
> poor small packet performance on a firewall (some network drivers can have |
18 |
> multiqueue too). Maybe start with this; |
19 |
> https://www.thomas-krenn.com/en/wiki/Linux_Multi-Queue_Block_IO_Queueing_Mechanism_(blk-mq) |
20 |
|
21 |
Interesting article. |
22 |
|
23 |
> It looks like the nvme driver was made "mutliqueue" in kernel 3.19. |
24 |
|
25 |
> FWIW my system is 8 core (AMD 8350). Its odd having two queues on the same |
26 |
> interrupt, but I have the same for q0 and q1, .... |
27 |
|
28 |
I think q0 is the "administrative" queue, and the other 8 are ordinary |
29 |
queues. (Sorry, I read that somewhere, but can't remember where). |
30 |
|
31 |
> .... but on your system i'd say there should be some queues on other |
32 |
> interrupts to they can be serviced by other cores, so that doesnt look |
33 |
> right. |
34 |
|
35 |
It wasn't right. |
36 |
|
37 |
> Do you have MSI enabled? Bus options -> PCI Support -> Message Signaled |
38 |
> Interrupts (MSI and MSI-X) |
39 |
|
40 |
I didn't have MSI enabled, but do now. I now get 5 queues (nvmeq[0-4]) |
41 |
on four interrups, and the interrupts are spread over the four cores |
42 |
(I've got a 4 core Athlon). |
43 |
|
44 |
> If your system is not too old you may get more interrupts or a better |
45 |
> spread with that enabled. |
46 |
|
47 |
Yes, that is the case. From a "warm start", I was able to copy my 1.4GB |
48 |
file in 2.76s. This is a bit more like it! |
49 |
|
50 |
> When I look at the entire /proc/interrupts, there are just 30 lines |
51 |
> > listed, and I suspect there are no more than 32 interrupt numbers |
52 |
> > available. Is there any way I can configure Linux to give my SSD more |
53 |
> > than one interrupt line to work with? |
54 |
|
55 |
> > > FWIW |
56 |
> > > # hdparm -tT /dev/nvme0n1 |
57 |
|
58 |
> > > /dev/nvme0n1: |
59 |
> > > Timing cached reads: 9884 MB in 2.00 seconds = 4945.35 MB/sec |
60 |
> > > Timing buffered disk reads: 4506 MB in 3.00 seconds = 1501.84 MB/sec |
61 |
|
62 |
> > I get: |
63 |
|
64 |
> > /dev/nvme0n1: |
65 |
> > Timing cached reads: 4248 MB in 2.00 seconds = 2124.01 MB/sec |
66 |
> > Timing buffered disk reads: 1214 MB in 3.00 seconds = 404.51 MB/sec |
67 |
|
68 |
> > So my "cached reads" speed is (a little under) half of yours. This is |
69 |
> > to be expected, since my PCIe lanes are only version 2 (and yours are |
70 |
> > probably version 3). |
71 |
|
72 |
|
73 |
> FWIW the motherboard manual says it has PCIe 2.0 x16 slots. Agree that |
74 |
> cache speed is likely a hardware issue. |
75 |
|
76 |
|
77 |
> > But the "buffered disk read" are much slower. Is |
78 |
> > this just the age of my PC, or might I have something suboptimally |
79 |
> > configured? |
80 |
|
81 |
|
82 |
> You look like you're getting SATA speeds, but since you have the nvme |
83 |
> device, i guess that implies you havent fallen back to SATA. |
84 |
|
85 |
I don't think the SSD has a SATA interface. |
86 |
|
87 |
> Could well be older hardware or less PCIe slots/lanes. |
88 |
|
89 |
My $ hdparm -tT /dev/nvme0n1 speeds haven't improved since enabling MSI |
90 |
in the kernel. |
91 |
|
92 |
But I'm intending to build a new machine "soon" (depending on when I can |
93 |
get a suitable Ryzen motherboard), and will put this NVMe SSD into the |
94 |
new box. I have to decide whether to get another one of these NVMe SSDs |
95 |
to run as RAID-1, or whether to put swap, /usr, etc. on it, and build a |
96 |
RAID-1 from two cheaper SATA SSDs. |
97 |
|
98 |
-- |
99 |
Alan Mackenzie (Nuremberg, Germany). |