Home |
Configuration Function rtsmb_srv_share_add_tree_ex Function rtsmb_srv_set_group_permissions_ex Function rtsmb_srv_register_user_ex Function rtsmb_set_codepage_OEM Function rtsmb_set_codepage_ANSI |
ConfigurationThe SMB server's function rtsmb_srv_init_ex reads a few configuration constants from global structure CFG_SMBS: typedef struct { int MaxThreads, MaxSessions, MaxUsersPerSession, MaxFilesPerSession, MaxFilesPerShare, MaxFilesPerUser, MaxSearchesPerUser, MaxShares, MaxSharesPerSession, MaxGroups, MaxUsers, SmallBufferSize, BigBufferSize, NumBigBuffers, MaxServers, MaxDomains; } cfg_smbs; cfg_smbs CFG_SMBS; Applications can assign values to the members of CFG_SMBS before calling rtsmb_srv_init_ex to configure the SMB server. The function of each value and all default values are given below: MaxThreadsDefault: 0. Number of additional threads (i.e. in addition to the thread executing rtsmb_server) for processing SMB sessions. Each thread sequentially accepts an SMB request and processes it. If many sessions are to be maintained simultaneously, performance may be improved with additional threads. Note that the file system may sequentialize access to a disk. Thus, additional threads will only make sense if there are shares on several disks which the file system can access simultaneously. MaxSessionsDefault: 16. The maximum number of SMB sessions (connections from client computers) that can exist at any one time. MaxUsersPerSessionDefault: 4. The maximum number of simultaneously logged-in users for each session. Some versions of Windows like to maintain several simultaneous connections for the same user, so this value should not be set too low. Increase it if you get a "network BIOS session limit was exceeded" error message from Windows. MaxFilesPerSessionDefault: 4. The maximum number of simultaneously open files per session. MaxFilesPerShareDefault: 4. The maximum number of simultaneously open files per share. MaxFilesPerUserDefault: 4. The maximum number of simultaneous open files per user. MaxSearchesPerUserDefault: 4. The maximum number of simultaneously file searches per user. MaxSharesDefault: 4. The maximum number of shares. MaxSharesPerSessionDefault: 16. The maximum number of shares that can be opened by a session. Windows likes to open several connections to single shares, so this value should not be set as low as MaxShares. MaxGroupsDefault: 4. The maximum number of user groups including the built-in group "Guests". MaxUsersDefault: 4. The maximum number of users including the built-in anonymous user. SmallBufferSizeDefault: 2936. Size of the server's internal buffers (3 per server thread). Lower values save RAM at the expense of reduced performance because more packets may need to be exchanged. This value must not be less than 1028. For best performance, the chosen value should make best usage of the 1514 byte size Ethernet frames. For example, this is the case for 1476, 2936, 4396, or 8776. BigBufferSizeDefault: 64k+16. Size of the server's internal buffers for large raw read or write requests. The number of such buffers is controlled with NumBigBuffers. Many SMB clients do not support values other than 64k+16, so it is not recommended to change it. NumBigBuffersDefault: 0. Number of big buffers for large raw read or write requests. Not every SMB client actually uses raw read/write requests; so allocating large buffers frequently has no effect. If no big buffers are available, small buffers will be used instead. MaxServersDefault: 32. Maximum number of other SMB servers on the network the SMB server can keep track of. MaxDomainsDefault: 8. Maximum number of workgroups the SMB server can keep track of.
|