Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samba copy to usb stick overloads cpu #732

Open
catohagen opened this issue Jan 15, 2025 · 5 comments
Open

samba copy to usb stick overloads cpu #732

catohagen opened this issue Jan 15, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@catohagen
Copy link

catohagen commented Jan 15, 2025

Router Model Affected
TUF-AX3000 V2

Firmware Version Affected
3004.388.8_2-gnuton1

Is this bug present in upstream Merlin releases too?
not tested

Describe the bug
Whenever I try to copy files (mp3's) to the attached samba mounted USB stick (fairly new Kinston Datatraveler 64G) it starts well and Windows says 20-25 megabyte/s, then after 3-4 seconds it will quickly drop to 0, and I see most CPU's in TUF-AX3000 V2 stays at 100% a while, the routers webinterface gets unresponsive, SFTP connection gets unresponsive.

I've searched for similar cases, but its surprising to see all the search results are people looking to boost transfer speeds with buffer adjustments in samba config (for different routers though and back in 2018-2020)

Media Server is off and not configured....I tried USB2..0 mode and USB3.0 mode, no difference

Copying from the attached USB stick seems fine....

I tried to lower send and receive buffers in smb.conf.add, lowering them to 8k, but same happens...

To Reproduce
Steps to reproduce the behavior:
Copy 15-20 mp3 files to samba mount on the TUF-AX3000 V2

Expected behavior
not overload cpu

Screenshots
If applicable, add screenshots to help explain your problem or remove this section
image
image

starts well, then crawls for 1-2min, then some transfer activity when CPU comes back, then overload again
image

@catohagen catohagen added the bug Something isn't working label Jan 15, 2025
@catohagen
Copy link
Author

If there are som trick to apply somewhere, to restrict upload speed on samba transfers, it would help a lot

@gnuton
Copy link
Owner

gnuton commented Jan 15, 2025

please log to SSH before transfering the data and check the logs.
I am wondering if the problem can be in the writing to the USB stick.
Some errors may affect the kernel. This is true if the router gets stuck or even more if it doesn't recover.
If the problem it's only CPU related, then maybe some setting maybe be not good for you.

but again as first step, please check the logs for errors

@catohagen
Copy link
Author

what logfile should I check ?

@catohagen
Copy link
Author

catohagen commented Jan 15, 2025

[2025/01/15 12:26:19,  0] nmbd/nmbd.c:861(nmbd_main)
  nmbd version 3.6.25 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2025/01/15 12:26:20,  0] nmbd/nmbd_namequery.c:109(query_name_response)
  query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.1 for name WORKGROUP<1d>.
  This response was from IP 192.168.1.137, reporting an IP address of 192.168.1.137.
[2025/01/15 12:30:15,  0] nmbd/nmbd.c:66(terminate)
  Got SIGTERM: going down...
[2025/01/15 12:30:17,  0] nmbd/nmbd.c:861(nmbd_main)
  nmbd version 3.6.25 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2025/01/15 12:30:17,  0] nmbd/nmbd_namequery.c:109(query_name_response)
  query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.1 for name WORKGROUP<1d>.
  This response was from IP 192.168.1.137, reporting an IP address of 192.168.1.137.
[2025/01/15 12:30:18,  0] nmbd/nmbd.c:66(terminate)
  Got SIGTERM: going down...
[2025/01/15 12:30:20,  0] nmbd/nmbd.c:861(nmbd_main)
  nmbd version 3.6.25 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2025/01/15 12:30:20,  0] nmbd/nmbd_namequery.c:109(query_name_response)
  query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.1 for name WORKGROUP<1d>.
  This response was from IP 192.168.1.137, reporting an IP address of 192.168.1.137.
[2025/01/15 12:35:39,  0] nmbd/nmbd_namequery.c:109(query_name_response)
  query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.1 for name WORKGROUP<1d>.
  This response was from IP 192.168.1.137, reporting an IP address of 192.168.1.137.

found this in /var/log/log.nmbd

Got SIGTERM: going down...

@catohagen
Copy link
Author

Alright, I purchased a new Kingston XS1000 (external SSD), and this issue went away.

With the standard samba in the firmware, no tweaks... its peaks at 40-50MB/s write speed, and stays around 30
and not much activity on the cpu's, core 3 goes up to 40-50% but not for long.

Please disregard prior comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants