Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow SSD write? #3

Open
danergo opened this issue May 3, 2023 · 9 comments
Open

Slow SSD write? #3

danergo opened this issue May 3, 2023 · 9 comments

Comments

@danergo
Copy link

danergo commented May 3, 2023

Hi,

I would appreciate if you could reply to this issue.

I'm using a typeE slot with your adapter to insta an SSD.

SSD is Samsung PM991A, usually found in Steam decks.

Write speed is very low (max 50MB/s) and I believe this SSD is much more capable even with a single PCIe lane.

Are those resistors you mention in readme affecting this performance?

Also, during this write operation this SSD gets really hot (above 100C!).

Any help would be great, please.

Thank you.

@CRImier
Copy link
Owner

CRImier commented May 7, 2023

heyo! it's weird about the write speed. what are the other parameters, however? here's mine with some random Hynix, CPU is Celeron N2815, just tested today.

image

Are those resistors you mention in readme affecting this performance?

No, they're for tinkering. I have all of them installed on all of the adapters I sell - without three of them, PCIe might not work, and fourth one is likely optional but I install it anyway.

this SSD gets really hot (above 100C!).

Please recheck soldering! I've seen such a thing happen when one of the GPIOs (i.e. LED or other) is shorted to ground or other GPIO. Send me soldering pictures!

@CRImier CRImier mentioned this issue May 7, 2023
@CRImier
Copy link
Owner

CRImier commented May 7, 2023

I see that NanoPi R5C has only PCIe Gen 2 (and ofc, 1x) on the E-key slot. This will fundamentally limit the speeds involved, though, can't deny, write speed should be faster. Not seeing any problems in the #2 -mentioned dmesg, as far as I can tell, anyway.

Also, sorry for the CrystalDiskMark use - I only had a Windows PC handy capable of testing the adapters I assemble =( which tool did you use for write speed checking?

@danergo
Copy link
Author

danergo commented May 8, 2023

Hi!

I was used many commandline tools for testing:

  • cp
  • rsync
  • dd
  • mc (filecopy)

And yeah. R5C has PCIe 2.1 populated on its M.2 socket, which speed is 5GT (shall be around 500MBps).

SSD's controller seems being hot (PLS see this below picture):
img_20230419_223621

Soldering seems correct (made by professional company), but I can't send pictures currently.

SSD is getting hot only during write! Once write operation finishes, it cools down rapidly (to ambient temp).
Once write starts it gets hot rapidly, around 1°C/s until 100°C. Cool down with same speed after finish write.

Read operation doesn't cause warming (almost nothing).

I might have to add heatsink, it might be SSD's thermal regulation to limit the speed?

@danergo
Copy link
Author

danergo commented May 8, 2023

Please see my connector's soldering:

20230508_172815
20230508_172757

Although it's not perfect I can't see any shorts, can you?

Thx!

@CRImier
Copy link
Owner

CRImier commented May 9, 2023

I can't see any shorts either!

I also feel like this would be thermal throttling. Considered attaching something like a Raspberry Pi heatsink to the SSD?

@CRImier
Copy link
Owner

CRImier commented May 9, 2023

Basically, if it only heats up during write, then it's not a gpio thing I'd wager, so, wouldn't think about a short. BTW, are these boards HASL or ENIG? You'll want ENIG for non-prototyping-operation purposes. Other than that, nicely assembled! Can share who did it, if it's a mfg that's widely available, that is?

@danergo
Copy link
Author

danergo commented May 10, 2023

It's very similar to ENIG, but with Silver (not Gold). It's done by a small company nearby me, they are not cheap, but local hence I support them.

Other than that I don't have any heatsinks by hand currently however I found a thermal "pad", which reduced the heat massively. Althought speed stayed 50MBps.

img_20230509_161943

@danergo
Copy link
Author

danergo commented May 11, 2023

Hi!

Did you do impedance-matching on PCIe TX/RX pairs and clock? It needs to be matched for roughly 85Ohm in case of PCIe v2.x.

@CRImier
Copy link
Owner

CRImier commented May 31, 2023

I did it best-case-possible for two-layer, which is an acceptable method here - there's plenty of leeway in PCIe 2.x, especially on such a short path, the discrepancy is expected to be negligible. I thought about possible impedance issues, but your problems aren't indicative of such an issue - otherwise, read speed would be at a similar limit.

Speaking of which, your read speed isn't capped in the same way, I'd assume? Which makes me wonder if the read speed is a mere part of the writing-data equation for your SSD. Apart from writing being a slower operation, three of the four tools you listed have to go through the filesystem for SSD writes, and unless you explicitly dd to the drive as opposed into a file on the drive, that'll be true for dd too. Plus, your write speed will be affected by factors like how full the drive is. Reading directly from the SSD (dd from block device into /dev/null) will be a way more representative interface speed measurement, and my bet is, will show you a notably higher number.

Consider direct writes onto a fully trimmed SSD for a more objective estimate of how your SSD actually performs at its best - which, mind you, might require you take a backup of it first, because direct write tests done with i.e. dd (esp with full TRIM first) are data-destructive unless you have a fancy program which can make such tests but does a backup first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants