Code Monkey home page Code Monkey logo

Comments (11)

namjaejeon avatar namjaejeon commented on May 27, 2024

We should add smb2 max read, smb2 max write, cache read/trans buffers parameters in smb.conf to change default value. When installing cifsd package to target, smb.conf is also installed ?

from ksmbd-tools.

Andy2244 avatar Andy2244 commented on May 27, 2024

We should add smb2 max read, smb2 max write, cache read/trans buffers parameters in smb.conf to change default value. When installing cifsd package to target, smb.conf is also installed ?

Not really, we have our own default template i can add the values to, yet your default values look kinda "lavish" and not even samba4 uses such huge buffers.
So my suggestion would be to setup some basic tests and reduce all values to its minimum and work from there and see which increased values actually helps performance?

For now i just need some "good" defaults for low memory devices, the issue suggested disabling cache read buffers, cache trans buffers and reducing smb2 max read, smb2 max write, smb2 max trans to something like 64-512k?

So what is your suggestion here?

from ksmbd-tools.

namjaejeon avatar namjaejeon commented on May 27, 2024

Not really, we have our own default template i can add the values to, yet your default values look kinda "lavish" and not even samba4 uses such huge buffers.

These are default value(8MB) of samba4.
smb2 max read (G)
Default: smb2 max read = 8388608
smb2 max trans (G)
Default: smb2 max trans = 8388608

So my suggestion would be to setup some basic tests and reduce all values to its minimum and work from there and see which increased values actually helps performance?

Yes, Increased values will show better performance.

I recommend to use the following setup for 8/16MB RAM device.
[global]
smb2 max read = 64K
smb2 max write = 64K
smb2 max trans = 64K
cache read buffers = no
cache trans buffers = no

Thanks!

from ksmbd-tools.

Andy2244 avatar Andy2244 commented on May 27, 2024

These are default value(8MB) of samba4.
smb2 max read (G)
Default: smb2 max read = 8388608
smb2 max trans (G)
Default: smb2 max trans = 8388608

Fair enough, yet there is also this:

Please note that the default is 8MiB, but it's limit is based on the smb2 dialect (64KiB for SMB == 2.0, 8MiB for SMB >= 2.1 with LargeMTU).

If i interpret this correctly, this means they still just use 64kib without LargeMTU, which is kinda rare in home/small business environments.

from ksmbd-tools.

namjaejeon avatar namjaejeon commented on May 27, 2024

Windows 7, 10(> SMB2.1) and samba have LargeMTU support by default. So I think that LargeMTU will work on connection between windows and samba4. Could you please share tcpdump(or wireshark dump) to check whether LargeMTU is enable on connection between samba4 and windows 10 ? If it is disable, samba may check system resource...

from ksmbd-tools.

Andy2244 avatar Andy2244 commented on May 27, 2024

So I think that LargeMTU will work on connection between windows and samba4.

mhh last time i tried to get LargeMTU to work with ip4, it was mainly a router/switch problem, since most consumer grade routers/switches have no support for it or some buggy settings. Even Synology NAS have it disabled by default?
I'm also confused why its always explicitly listed as "SMB2 and Large MTU", while SMB3 is listed separately? Is this maybe a smb2 only feature and obsolete with smb3?

from ksmbd-tools.

namjaejeon avatar namjaejeon commented on May 27, 2024

I don't know how other device and target work.

No, SMB2 and SMB3 is compatible.(SMB1 is not compatible with SMB2/3). And You can think SMB3 = SMB2 + @. So LargeMTU can be worked on SMB3.
Okay, I will add the code that set max read/write size as 64K on SMB2/3 without LargeMTU.

But I's not sure that it help current issue...

from ksmbd-tools.

Andy2244 avatar Andy2244 commented on May 27, 2024

ok, i was mainly wondering why the "tiny" cifsd runs into oom crashes, while samba4 does not. I mean cifsd might be used by other embedded device optimized distros as well, so optimizing it more for minimal memory usage by default, might be worth the effort.

from ksmbd-tools.

namjaejeon avatar namjaejeon commented on May 27, 2024

Agreed, I will check it more.
Thanks for your opinion.

from ksmbd-tools.

namjaejeon avatar namjaejeon commented on May 27, 2024

@Andy2244 Could you please provide packet dump between samba4 and windows 10 on your low-end device(8 or 16MB RAM) ? I checked samba code, but they just set 8MB with SMB3(windows 10).

from ksmbd-tools.

Andy2244 avatar Andy2244 commented on May 27, 2024

Sure, but will be next year not at home anymore.

from ksmbd-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.