MariaDB writes at 500kb/s how to get it to write at normal speeds?
query_cache_type=1
query_cache_size=80M


For every write, it must scan the 80M for any references to the table being written to, and purge those entries.  This is an example of where the Query cache hurts performance, and should be completely disabled for production servers.

innodb_flush_log_at_trx_commit=1


cause a disk flush at every "transaction".  If you are using autocommit=ON and writing one row per SQL statement, then this is a huge overhead.  Some workarounds:

BEGIN;
write lots of rows
COMMIT;


and/or

INSERT ... VALUES (...), (...), ... -- Writing lots of rows in a single SQL.


and/or

Switch to SSDs


500KB/s is not a useful metric -- Are they tiny rows or huge rows?  100 rows per second is a typical speed for HDD drives with all the worst settings (innodb_flatc=1, single-row transactions, etc).  Adding any one of the above tips, you might get to 1000 rows/sec.  Going beyond that is possible, but more challenging.

As for local versus remote...  There could be differences in the settings.  There could be significant latency.  A distance of 120ms (a few thousand miles or kilometers) would explain the 10 minutes.

My high speed ingestion blog may be useful.