1

For hardware reasons I don't want to get into (and have absolutely zero power to change), I need to set up an SSD over a USB-3 (type A) bus that is optimised for write performance.

In my use case, I'm expecting to write c. 250 files per second, each about 600KB, for extended periods of time (between 15 mins and three hours, say). That's a data rate of about 144MBps

I'm asking here because with the Samsung 850 EVO and PNY USB enclosure I have, I have been getting unacceptable performance. Even going to far as to have the drive unmount itself after a few minutes of heavy use (when it then remounts itself, but I lose the ability to write for a while).

My questions then (in what I hope is decreasing order of relevance for this site) are:

  1. What mount options should I be looking to use for this drive?
  2. The drive is currently ext4, is there any benefit to reformatting it differently?
  3. Is there anything else I can tune in my software configuration for performance?

If any of these are better asked in another forum, please point me in the right direction.

My distro is Ubuntu 16.04-based, arm64 architecture.

closed as too broad by Kiwy, Jesse_b, G-Man, user34720, Timothy Martin May 10 '18 at 17:04

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Consider switching from SATA to m.2. – Ignacio Vazquez-Abrams May 9 '18 at 10:53
  • 2
    It probably is the enclosure. The thing is that there aren't many USB 3.0 SATA controller chips out there. Switching to a drive interface with higher performance requirements might find you a better chip. – Ignacio Vazquez-Abrams May 9 '18 at 11:08
  • 1
    Random unmounting is a fault in hardware and/or kernel drivers. For that you would need to provide hardware information. Performance is notoriously about measurements. For that you would need to provide performance measurements. It sounds like the hardware is the first thing you want to look at here, if you want to have any expectation that this will work in the long run. – sourcejedi May 9 '18 at 15:36
  • 2
    A device should never unmount itself. That is a hardware failure. Look in the kernel logs for io error messages. Provide separate adequate power to the device, reduce cable lengths and use good quality cables. Do not go via any usb3 hubs. Check drive temperature with smartctl. Presumably your ext4 is using 4k blocks, not 512. Did you mount with option discard if your drive supports it? Have you updated the disk (and enclosure) firmware to the latest? – meuh May 9 '18 at 18:35
  • 1
    I edited away the parts of your question that are off-topic here. For hardware choice, you can ask on Hardware Recommendations (please read their question guidelines. The part about tips for programming for performance is really too broad, and we don't do programming here. It could be a topic for Stack Overflow or Software Engineering, but you'd need to ask a much more focused question, these sites don't to generic advice. – Gilles May 9 '18 at 19:30

Browse other questions tagged or ask your own question.