Comments (11)
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.
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.
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.
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.
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.
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.
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.
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.
Agreed, I will check it more.
Thanks for your opinion.
from ksmbd-tools.
@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.
Sure, but will be next year not at home anymore.
from ksmbd-tools.
Related Issues (20)
- move cifsd-team/cifsd-tools to cifsd-team/cifsd-tools-old and move namjaejeon/cifsd-tools to cifsd-team/cifsd-tools HOT 4
- move cifsd-team/smbd-tools to cifsd-team/smbd-tools-old and move namjaejeon/smbd-tools to cifsd-team/smbd-tools
- Printing support with Ksmbd HOT 10
- Does ksmbd supports recycle? HOT 3
- ksmbd.service.in HOT 4
- windows domain(ads) support HOT 49
- ksmbd.adduser should check the username already in /etc/passwd HOT 11
- uid to windows SID mapping support HOT 5
- Symlink in share path hinders total and free disk space reporting to Windows [updated] HOT 9
- "hosts allow" does not work? HOT 4
- 'unix password sync = yes' for ksmbd.adduser
- Crashes with a Windows 10 client HOT 3
- Can't open PID file /run/ksmbd.lock (yet?) HOT 7
- add the ability to listen in on certain network addresses HOT 2
- Permission denied with ksmbd-tools 3.5.0-1, but works fine with 3.4.9-1. HOT 16
- KSMBD_DCERPC_RETURN_READY should be cleared if the return isn't ready HOT 3
- Assertion failed: 0 (lib/socket.c) ? HOT 4
- Just calling "cifsadmin" will create a empty cifsdpwd.db. HOT 4
- Folders/Files are not fully deleted via explorer on mounted share. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ksmbd-tools.