LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-25-2024, 06:30 AM   #1
ganatoci
LQ Newbie
 
Registered: May 2024
Posts: 2

Rep: Reputation: 0
When I use four drives, one operates very slowly


I’m experiencing unusual behavior with my system. Recently, I purchased this item from Aliexpress
https://www.aliexpress.com/item/1005005653706057.html
You can see here a picture https://ibb.co/5jMd4p2
Is a M.2 to Sata3.0 Adapter Card 6 Port III 6GB/S Pci-E Controller Card equipped with the ASM1166 chip.

The system where it is installed is a MiniPC with an Intel N100 that has two M.2 slots. In one of these slots, there is an NVMe drive that contains the operating system (Ubuntu 24.04). The other slot is occupied by an adapter that controls four separate SATA HDDs, each with a capacity of 3TB. I prefer to use them individually rather than in RAID. Then i have 4 disks (/dev/sda /dev/sdb /dev/sdc /dev/sdd) mounted on 4 directories (/drv/diska /drv/diskb /drv/diskc /drv/diskd)

I conducted a system test using the command dd if=/dev/random of=/drv/disk[DiskLetter]/rand.txt bs=1M count=100. This command writes a random file to the [DiskLetter] disk. I executed this command simultaneously on all disks during the test.

Everything operates smoothly as I write to three disks simultaneously. In this setup, each disk maintains a writing speed of approximately 150MB/s. Consequently, I can achieve a combined writing speed of 450MB/s across the disks. I have the flexibility to choose any configuration I prefer. For instance, whether I write to sda, sdb, sdd, or sda, sdc, sdd, or even sda, sdb, sdc, the speed remains consistently around 450MB/s.
Here you can see a screenshot of nmon when I write on three disks simultaneously https://ibb.co/h18NQJ2, here when I write only on one disk https://ibb.co/KFSG4bB

The issue arises when I attempt to write to four disks concurrently. In fact, the last disk (/dev/sdd) consistently operates at a speed ranging from 40MB/s to 5MB/s. The other disks perform well, maintaining a speed of about 150MB/s each.
Here you can see a screenshot of nmon. https://ibb.co/Hhck7SS

I expected that the workload across the disks would be more distributed, with each disk achieving a speed of 100MB/s. However, it appears that the system prioritizes the first three disks in sequence, causing the fourth disk to suffer from insufficient bandwidth.

I’ve tried everything, including physically rearranging the disk order on the adapter and using different disks. However, the last disk (sdd) consistently shows a speed of 40MB/s to 5MB/s, while the others maintain a speed of around 150MB/s.

It appears that the I/O scheduler in the operating system is not balancing the data transmission effectively. It could also be an issue with the controller. I’m uncertain and would appreciate assistance in resolving this mystery.

Last edited by ganatoci; 05-25-2024 at 06:32 AM.
 
Old 05-25-2024, 09:55 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,990

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Quote:
Recently, I purchased this item from Aliexpress
Famous last words before problems ensue. That being said, I think it is probably a hardware issue. Three drives running full throttle through that M.2 slot may be saturating the available pcie lanes. I believe the N100 has a max of 9 pcie lanes compared to the typical intel Core cpus with usually 20. The motherboard that the cpu is on will also impact the number of pcie lanes available and what's allotted to that M.2 slot. Don't know what's on your N100 motherboard. Also, the way your adapter's firmware meters out the available bandwith may be coming into play as well.
 
Old 05-25-2024, 10:46 AM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,347

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
The problem may be that /dev/random is overloaded. Reference the Wikipedia article: https://en.wikipedia.org/wiki//dev/random

/dev/random is seeded with entropy from environmental noise, collected from device drivers and other sources. If not enough entropy is available then /dev/random is blocked until enough entropy is built up to appear to generate random numbers. Thus if you overload /dev/random it may periodically block itself for a while. Maybe you can run three /dev/random threads simultaneously without blockage and get blockage when you try to run four threads simultaneously.

You could test out this idea by getting your source data from /dev/zero instead of /dev/random.

Last edited by jailbait; 05-25-2024 at 10:47 AM.
 
Old 05-25-2024, 11:26 AM   #4
lvm_
Senior Member
 
Registered: Jul 2020
Posts: 1,024

Rep: Reputation: 358Reputation: 358Reputation: 358Reputation: 358
Your contraption is a port multiplier https://www.asmedia.com.tw/product/4...dYQ8bxZ4UR9wG5, and not just any port multiplier but a cascaded port multiplier - it is as bad and as cheap as it can get. It connects multiple daisy-chained devices to a single data lane and, when bandwidth is saturated performance suffers. How exactly it suffers is determined by the multiplier, you can do nothing about it on the OS level. Connecting disks to different ports might help though.
 
Old 05-25-2024, 12:38 PM   #5
ganatoci
LQ Newbie
 
Registered: May 2024
Posts: 2

Original Poster
Rep: Reputation: 0
Are there any alternative products, possibly at a higher price point, that I can purchase?

I require an M.2 NVMe to SATA converter with 6 ports
.
 
Old 05-26-2024, 07:53 AM   #6
lvm_
Senior Member
 
Registered: Jul 2020
Posts: 1,024

Rep: Reputation: 358Reputation: 358Reputation: 358Reputation: 358
Quote:
Originally Posted by ganatoci View Post
I require an M.2 NVMe to SATA converter with 6 ports
.
I don't think so. You want to add several disks to you PC, there are different ways of doing it and plugging them all into a port designed for just one disk is not a good solution. A nice PCIe SATA card with proper independent ports is the right way to do it. But if you are bent on using port multipliers (or just don't have free PCI slots), look for those that support FIS.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl script that skips a header, sorts the rest, then operates on the data captainentropy Programming 4 11-11-2013 02:32 AM
Looking for a Linux that operates similar to windows G4331 Linux - Newbie 32 03-03-2011 11:15 PM
windows move slowly (repaint/redraw) and firefox scrolls slowly with ATI driver netrek Debian 3 11-20-2009 01:18 PM
PDA that operates well under linux leosgb Linux - Hardware 5 06-23-2006 08:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration