Author Topic: MHO900 Raw Data Read Patch  (Read 286 times)

0 Members and 1 Guest are viewing this topic.

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1208
  • Country: au
MHO900 Raw Data Read Patch
« on: August 31, 2026, 08:18:37 am »
Here's a little contribution to the Rigol MHO900 community if it hasn't been solved before (I couldn't find it at least).

https://github.com/harvie256/mho-speed-patch

The MHO900 (and possibly the DHO900?), has it's SCPI raw data read out speed limited by some low performance code that builds the data transfer arrays using byte by byte vector appends for every byte of the transfer.  The patch replaces the two places this happens with a malloc and memcpy.  This takes the raw data transfer speeds from ~1.5MB/s up close to the wire limit for the 100Mbit ethernet.  The patch also pins the transfer thread to one of the A72 cores so it stops it being kicked down to the low power cores by the GUI threads.

All the details in the repo. Sorry the doco is Claude written, so it's correct, but sounds like it's trying to sell something.

This patch currently just patches the running binary in RAM, so nothing changed on the scope permanently. The solution needs more thorough testing before I'd make it a permanent binary change. But I don't think it matters much anyway, as you're going to be generally connected to a PC to be reading data out anyway, so it doesn't make much difference if you need to run a script to up the speed.

If anyone would like to test on the DHO series that'd be interesting.

There's more optimizations I can see, but these couple have got the bulk of the useful gains.
 
The following users thanked this post: moffy, Hydron

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1208
  • Country: au
Re: MHO900 Raw Data Read Patch
« Reply #1 on: August 31, 2026, 11:19:17 am »
I've already proved myself wrong that most of the gains were done. More profiling showed there was a destructor side to the vectors that was effectively doing the same thing. That now patched and added a USB-GbE adapter into the USB2 port and we're saturating the USB2 Hub @ 28.5MB/s transfer speeds. So that's around 20x speed up on where this started.

Wish they put the GbE phy on the RK3399, or brought out its USB3 port.
 

Offline moffy

  • Super Contributor
  • ***
  • Posts: 2998
  • Country: au
Re: MHO900 Raw Data Read Patch
« Reply #2 on: August 31, 2026, 11:39:11 am »
I don't really understand a lot of the detail of how the patch works, but is the speed up only for wired LAN but not for WiFi?
 

Offline scottapotamas

  • Regular Contributor
  • *
  • Posts: 72
  • Country: au
Re: MHO900 Raw Data Read Patch
« Reply #3 on: August 31, 2026, 12:06:15 pm »
Wouldn't be surprised they've carried similar software-side design issues from older platforms.

I did a write-up for accelerating my MSO8204 SCPI readout which might give you some other ideas to look for.

https://26oclock.com/posts/rigol-software/

Still working on the second half for realtime streaming though.
 
The following users thanked this post: Harvs

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1208
  • Country: au
Re: MHO900 Raw Data Read Patch
« Reply #4 on: August 31, 2026, 08:42:46 pm »
I don't really understand a lot of the detail of how the patch works, but is the speed up only for wired LAN but not for WiFi?

It's the garbage USB-WIFI adapter that comes with them. No doubt if you bought a decent WiFi adapter then you'd get the same result.

Edit: As in the same speed up result as the Wired LAN or USB-LAN.
« Last Edit: August 31, 2026, 08:50:03 pm by Harvs »
 
The following users thanked this post: moffy

Offline HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1208
  • Country: au
Re: MHO900 Raw Data Read Patch
« Reply #5 on: August 31, 2026, 09:00:29 pm »
Wouldn't be surprised they've carried similar software-side design issues from older platforms.

I would not be surprised at all either, given it's in their SCPI code that the problems lie.

Nice write up of your investigation.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf