Welcome! Log In Create A New Profile

Advanced

Debian on Dell Kace M300

Posted by JDS420 
Re: Debian on Dell Kace M300
July 29, 2021 11:13AM
1 Use newer kernels to get better performance. Old 5.2.9 , iperf is only 600-700, while newer kernels can reach 940mbit/s
2 5400 rpm drive is actually a bit slow...
--------------------------------------------------------------
I use one 2.5" 750GB 5400rpm HD, samba transfer big file speed ~80MB/s, much better performance than dockstar

One bad USB flash drive on usb to make system stable.

root@m300:~# hdparm -i /dev/sda

/dev/sda:

Model=TOSHIBA MQ01ABD075, FwRev=AX003M, SerialNo=changedhere
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=1465149168
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=yes: unknown setting WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-3,4,5,6,7

* signifies the current active mode

root@m300:~# uname -a
Linux m300 5.12.6-kirkwood-tld-1 #1.0 PREEMPT Sat May 22 16:43:11 PDT 2021 armv5tel GNU/Linux

root@m300:~# dd if=/dev/sda of=/dev/null bs=4M count=512
512+0 records in
512+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 22.3871 s, 95.9 MB/s
Attachments:
open | download - m300_samba.jpg (64.3 KB)
Re: Debian on Dell Kace M300
July 29, 2021 05:35PM
@daviddyer, thanks for sharing. I was looking mostly at writes which may just be slow no matter what?

root@kaceM300-2:/tmp/usb# uname -a
Linux kaceM300-2 5.12.6-kirkwood-tld-1 #1.0 PREEMPT Sat May 22 16:43:11 PDT 2021 armv5tel GNU/Linux

root@kaceM300-2:~# hdparm -i /dev/sda

/dev/sda:

 Model=ST1000LM035-1RK172, FwRev=SBM3, SerialNo=ZDE41VKE
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=1953525168
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
 AdvancedPM=yes: unknown setting WriteCache=enabled
 Drive conforms to: Reserved:  ATA/ATAPI-4,5,6,7

 * signifies the current active mode

If I had just looked at reads I might have thought SATA was really fast.

SATA:
root@kaceM300-2:~# dd if=/dev/sda of=/dev/null bs=4M count=512
512+0 records in
512+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 17.1665 s, 125 MB/s

Same drive, USB:
root@kaceM300-2:/tmp# dd if=/dev/sda of=/dev/null bs=4M count=512
512+0 records in
512+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 61.3963 s, 35.0 MB/s

125MB/s vs 35MB/s - quite a difference!

Writes:

SATA:
root@kaceM300-2:/tmp/sata# sync ; dd if=/dev/zero of=zeros.bin bs=1M count=1024 ; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 94.5218 s, 11.4 MB/s

USB:
root@kaceM300-2:/tmp/usb# sync ; dd if=/dev/zero of=zeros.bin bs=1M count=1024 ; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 99.7069 s, 10.8 MB/s

11.4MB/s vs 10.8MB/s - not so impressive. The drive is certainly capable of more than 11MB/s.

I should note that this drive is formatted with NTFS, but I tried an ext4 drive before it went belly up and got pretty much the same results.

The problem I was hoping using the M300 with its SATA interface would solve is that one of the myriad of services my Dockstar performs is being my media server. If I'm copying a large file to it at the same time as someone is streaming something it can't keep up. I haven't tried that use case with the M300, but having my media drive go belly up during this testing hasn't put me in the mood to continue down this path. I really wish I had left well enough alone.
Re: Debian on Dell Kace M300
July 29, 2021 06:38PM
Samba write from Windows 10 SSD to M300 (750GB SATA 2.5" Toshiba 5400rpm)

About 20-60MB/s write about 1GB file M300
Attachments:
open | download - m300_write_samba.jpg (64.5 KB)
Re: Debian on Dell Kace M300
July 29, 2021 06:42PM
ST1000LM035-1RK172

SMR drive

this might be the reason for slow writing....

The BIG cache (128MB) of this drive reminds me of SMR...



Edited 1 time(s). Last edit at 07/29/2021 06:54PM by daviddyer.
Re: Debian on Dell Kace M300
July 29, 2021 07:08PM
renojim,

Unfortunately, I think David is right. Might be the SMR type is the reason.

For sanity, run the same command David used (so we compare apple-to-apple):

dd if=/dev/sda of=/dev/null bs=4M count=512

FWIW, I don't think this Seagate HDD is suited for what you have in mind. You were transfering large amount of data to it while somebody is streaming.

It is perfectly nice as an archive media for streaming. But I would not use it as a system disk. And also I would avoid archiving data during prime hour.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
July 29, 2021 10:18PM
> ST1000LM035-1RK172
>
> SMR drive
>
> this might be the reason for slow writing....
>
> The BIG cache (128MB) of this drive reminds me of
> SMR...

Yeah :) they compensate the slow SMR disk with a large cache. I did look at some new Seagate 2.5" portable HDDs before, since the price is so good. But when I looked at the specs, I balked. However, if we want to use it on small plugs like Pogo V4/ GoFlex Net/ GF Home/ M300 as a media server disk, it is quite decent for the cost.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
July 31, 2021 05:22PM
bodhi, I posted the read results. My disk was faster than David's.

Before I blew it up, I used a 8TB drive formatted with ext4. It has an even bigger cache, but I always get "Asking for cache data failed" and "Assuming drive cache: write through" in dmesg, whatever that means. It's definitely CMR (if WD is to believed) and had practically the same read/write speeds connected to USB or SATA.

This drive I'm testing with is just one I had lying around; it won't be my media disk. I plan on getting a replacement 8TB drive and I'll run the tests again. I had assumed that the USB connection was the bottleneck, so I expected much better results with SATA.

I spent hours testing, looking into SMR vs CMR (there's no reliable/foolproof method to ascertain what a disk is using, but I don't believe it comes in to play on these small writes to a "new" disk and I'm fairly certain my disk is CMR), and I've come to some conclusions:

  • The SATA port isn't substantially faster than the USB port.
  • Simultaneous reads and writes will bring both transfer rates to a crawl
  • The M300 doesn't offer much over my old reliable Dockstar

I am curious to see how much of an effect NTFS had on my tests, so I'll reformat it to ext4 and try some more tests.
Re: Debian on Dell Kace M300
July 31, 2021 06:30PM
renojim,

> [*] The SATA port isn't substantially faster than
> the USB port.

Usually you can get 8-10 MB/s with USB, so your test is in the ballpark for USB.

David's test proved that the SATA port on this box is quite fast. And he used an old 2.5" HDD for laptop drive.

root@m300:~# dd if=/dev/sda of=/dev/null bs=4M count=512 
512+0 records in 
512+0 records out 
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 22.3871 s, 95.9 MB/s

I'm little bit lazy to open up my M300 :) (I'm testing various 2021.07 u-boots for Kirkwood and the M300 is my test box). But I will do that when I have some time, to add another data point to this benchmark.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
July 31, 2021 07:09PM
Also,

I recall LeggoMyEggo has also tested this box with a 2.5 SSD. He did not report any bad observation.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
July 31, 2021 07:52PM
https://www.cnet.com/products/seagate-mobile-st1000lm035-hard-drive-1-tb-sata-6gb-s/

it is SMR.

SMR reading is as fast as old drives, but when it comes to writing something, it needs to (re)write much more than the data we intend to write.
Re: Debian on Dell Kace M300
July 31, 2021 07:56PM
And if your WD 8TB drive has 256MB cache and slow writing, guess it is SMR as well.... they give you such large cache for a reason, the seller is always smarter...



Edited 1 time(s). Last edit at 07/31/2021 08:03PM by daviddyer.
Re: Debian on Dell Kace M300
July 31, 2021 09:28PM
As I said, WD says all their drives over 6TB are CMR (https://www.extremetech.com/computing/309730-western-digital-comes-clean-shares-which-hard-drives-use-smr).
It goes to show you how hard it is to determine whether or not a drive is SMR or CMR. No amount of querying parameters with hdparm or smartctl showed any indication of SMR.
SMR/CMR really doesn't come into play until you've done on the order of 500GB worth of writes to a drive. Believe me, I researched this to death. (https://unix.stackexchange.com/questions/286432/how-to-determine-whether-hard-drive-uses-smr - I ran the test for an hour and got constant data rates, but never approached writing 500GB since it's so slow). Keep in mind that this is a new or fresh drive in that it's been lying around for years with little to no use.

Let me format my drive with ext4 and run some more tests. Given the amount of CPU cycles dedicated to mount.ntfs during file transfers that may be part of the problem.

I'd rather see meaningful file read/writes over reading from /dev/sda. I get 125MB/s reading from /dev/sda. So what? SATA vs USB gives me little to no advantage. I'm really hoping that's because of NTFS. We'll see...

Sorry if I seem short, but I'm just in a bad mood. On top of spending hours on this and having it bear no fruit my desktop Windows computer has decided it wants to randomly crash. I do appreciate you guys looking into it.

It may be time to get drunk and revisit this later. :-)
Re: Debian on Dell Kace M300
July 31, 2021 10:08PM
> Let me format my drive with ext4 and run some more
> tests. Given the amount of CPU cycles dedicated
> to mount.ntfs during file transfers that may be
> part of the problem.

Now that is something could be problematic. That brings a question, was the drive sleeping when you started testing? I would run the test at least twice consecutively to make sure it was fully spun up before test is run.

> I'd rather see meaningful file read/writes over
> reading from /dev/sda. I get 125MB/s reading from
> /dev/sda. So what? SATA vs USB gives me
> little to no advantage. I'm really hoping that's
> because of NTFS. We'll see...

I would never test with NTFS. But If I did then make sure the "big_writes" option is in effect. This is in my mount script for all SATA drives.

         elif  [ $FSTYPE = "ntfs" ]; then
            mount -L $disk_label -o noatime,big_writes /media/$disk_label

>
> Sorry if I seem short, but I'm just in a bad mood.
> On top of spending hours on this and having it
> bear no fruit my desktop Windows computer has
> decided it wants to randomly crash. I do
> appreciate you guys looking into it.

Ouch!

> It may be time to get drunk and revisit this
> later. :-)

Yeah, something is missing, and if you spent too much time looking, it could be an "ah %^&*!" moment later :)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Dell Kace M300
August 12, 2021 01:01AM
Ok, so I'm finally sober enough to revisit this. :-) The TL;DR version is don't use NTFS to do disk tests. The SATA port is substantially faster than the USB port on the M300, which is what I had expected. Here's the data with the same Seagate 1TB drive formatted as ext4:

USB read:
root@kaceM300-2:/tmp/usb# sync ; dd if=zeros.bin of=/dev/null bs=4M count=1024 ; sync
1024+0 records in
1024+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 110.646 s, 38.8 MB/s

USB write:
root@kaceM300-2:/tmp/usb# sync ; dd if=/dev/zero of=zeros.bin bs=4M count=1024 ; sync
1024+0 records in
1024+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 123.553 s, 34.8 MB/s

SATA read:
root@kaceM300-2:/tmp/sata# sync ; dd if=zeros.bin of=/dev/null bs=4M count=1024 ; sync
1024+0 records in
1024+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 32.3266 s, 133 MB/s

SATA write:
root@kaceM300-2:/tmp/sata# sync ; dd if=/dev/zero of=zeros.bin bs=4M count=1024 ; sync
1024+0 records in
1024+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 52.8933 s, 81.2 MB/s

And for simultaneous read/write:
USB read (while writing):
root@kaceM300-2:/tmp/usb# sync ; dd if=/dev/zero of=zeros2.bin bs=4M count=1024 ; sync
1024+0 records in
1024+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 142.368 s, 30.2 MB/s
USB write (while reading):
root@kaceM300-2:/tmp/usb# sync ; dd if=zeros.bin of=/dev/null bs=4M count=1024 ; sync
1024+0 records in
1024+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 249.903 s, 17.2 MB/s

SATA read (while writing):
root@kaceM300-2:/tmp/sata# sync ; dd if=/dev/zero of=zeros2.bin bs=4M count=1024 ; sync
1024+0 records in
1024+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 63.161 s, 68.0 MB/s
SATA write (while reading):
root@kaceM300-2:/tmp/sata# sync ; dd if=zeros.bin of=/dev/null bs=4M count=1024 ; sync
1024+0 records in
1024+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 83.11 s, 51.7 MB/s

For completeness I did the same tests on my Dockstar and got pretty much the same results as the M300 USB tests. I'm a little surprised I had problems streaming video while writing to the drive given that the read speed doesn't seem to be affected during the simultaneous write, but I no longer have the original 8TB disk to use for testing (damn it!).

I did one final test where I performed the read over and over during the write since the read finishes before the write and the USB write is really brought to its knees on the Dockstar, but not on the M300. The SATA write isn't affected and is sometimes faster than the read.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: