小编mev*_*ron的帖子

对 SMB 网络共享的少量写入在 Windows 上很慢,而在 CIFS Linux 挂载上则很快

在执行小型写入时,我一直在努力解决 SMB/CIFS 共享的性能问题。

首先,让我描述一下我当前的网络设置:

服务器

  • Synology DS215j(启用 SMB3 支持)

客户端(同一台计算机双启动有线 Gig-E)

  • Ubuntu 14.04.5 LTS,可信赖的 Tahr
  • 视窗 8.1

配置文件

[global]
    printcap name=cups
    winbind enum groups=yes
    include=/var/tmp/nginx/smb.netbios.aliases.conf
    socket options=TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
    security=user
    local master=no
    realm=*
    passdb backend=smbpasswd
    printing=cups
    max protocol=SMB3
    winbind enum users=yes
    load printers=yes
    workgroup=WORKGROUP
Run Code Online (Sandbox Code Playgroud)

我目前正在使用以下用 C++ 编写的程序(在此处的GitHub 上)测试小型写入性能:

#include <iostream>
#include <fstream>
#include <sstream>

using namespace std;

int main(int argc, char* argv[])
{
    ofstream outFile(argv[1]);
    for(int i = 0; i < 1000000; i++)
    {
        outFile << "Line …
Run Code Online (Sandbox Code Playgroud)

networking linux windows performance server-message-block

10
推荐指数
1
解决办法
1万
查看次数