Samba4 and Ksmbd eats all RAM

Please can anyone tell me for this:

  • I installed Samba4

  • Created a partiton

  • Shared it

But when I copy any file it eats all RAM of router

So there starts stuttering in copy and drops speed. When I flushing RAM, then it seems good with speed.

Maybe I missed some configs? I tried Samba4 and Ksmbd
But in Ksmbd i tried this settings that i found on forum:

[global]
netbios name = |NAME|
server string = |DESCRIPTION|
workgroup = |WORKGROUP|
interfaces = |INTERFACES|
bind interfaces only = yes
ipc timeout = 20
deadtime = 15
map to guest = Bad User
server signing = auto
smb2 max read = 512K
smb2 max write = 512K
smb2 max trans = 512K
cache read buffers = no
cache write buffers = no

But still no results.

Please post the output (by ssh:ing to the device) of command ubus call system board.

{
        "kernel": "6.6.93",
        "hostname": "Jessya",
        "system": "ARMv8 Processor rev 4",
        "model": "Cudy WR3000P v1",
        "board_name": "cudy,wr3000p-v1",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "24.10.2",
                "revision": "r28739-d9340319c6",
                "target": "mediatek/filogic",
                "description": "OpenWrt 24.10.2 r28739-d9340319c6",
                "builddate": "1750711236"
        }
}

most likely unrelated, start by upgrading to 24.10.4.

what exactly does this mean ?

it's an USB2 port, what speeds are you getting ?
what's the USB port storage device ?

I mean that when i starting copy to shared folder, RAM is filling up again and it drops speed, delays when copying like 10-20sec

Average speed is 10-12 megabytes when RAM have available space and 1-2 megabytes when RAM is about 90-96% occupied

two out of three, you're almost there.

Cudy WR3000P have only snapshot build, i dont want to update rn and 24.10.2 not such old

then where does this 24.10.2 come from ?

It's build from another forum, 4PDA

Retest installing a snapshot, we can't support 3rd party black box images.


It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

1 Like

So i took my Cudy TR3000 and installed 24.10.4 and Ksmbd
I tried to copy a file again, but it eats RAM again

then it's probably working as designed ?
what is the actual issue ?

1 Like

this process eats a lot of RAM, and doesn't flush when its done. Thats a problem. But Cudy TR3000 seems like doesnt suffer from speed drops, but Cudy WR3000P does

Nothing in your posts illustrates any "speed drop" whatsoever.
Linux uses free memory for disk cache, if you write 10GB file it uses 10GB RAM to save disk IO on reading it back unless there is somebody else claiming memory. That is how it always worked.

3 Likes

Is this bad for device? no any harm if RAM will be always occupied?

the RAM will be freed eventually.

keep in mind "cache" is also allocated RAM.

there's no error here, as @brada4 pointed out.

1 Like

How about ksmbd only without Samba?

you shouldn't be able to start both at the same time ....

I installed Samba, than uninstalled it when i found out that it eats ram, than installed ksmbd and saw that behaviour of RAM again. Now I have only ksmbd because it seems work well