All Products
Search
Document Center

File Storage NAS:FAQ about performance

Last Updated:May 27, 2026

This topic answers frequently asked questions about the performance of File Storage NAS file systems that use the NFS or SMB protocol.

General performance

How does storage capacity affect file system performance?

It depends on the file system type:

  • General-purpose NAS file system: Throughput scales linearly with storage capacity — more capacity means higher read and write throughput. For details, see General-purpose NAS file systems.

  • Extreme NAS file system: Read and write performance increases in steps as storage capacity grows. For details, see Extreme NAS file systems.

How does ECS instance bandwidth limit NAS performance?

Actual NAS throughput is capped by the network bandwidth of the connected ECS instance. For example, if your NAS file system supports 500 MB/s but your ECS instance has a 1 Gbit/s (approximately 125 MB/s) network card, actual throughput tops out at around 125 MB/s.

What happens when read or write throughput exceeds the threshold?

NAS automatically throttles the request, which increases latency.

To raise the throughput threshold:

For throughput specifications, see Performance metrics of General-purpose NAS file systems and Performance metrics of Extreme NAS file systems.

How do I increase the throughput threshold of a General-purpose NAS file system?

Create a sparse file to increase the provisioned capacity. Throughput scales linearly with capacity. For the exact relationship, see Specifications of General-purpose NAS file systems.

Each 1 TiB of additional capacity adds:

  • Capacity NAS file system: +150 MB/s

  • Performance NAS file system: +600 MB/s

You are charged only for the actual space occupied by the sparse files. For pricing details, see Billing of General-purpose NAS file systems.

On Linux, run the truncate command:

sudo truncate --size=1TB /mnt/sparse_file.txt

In this command, /mnt is the mount path on the ECS instance.

On Windows, use fsutil:

fsutil file createnew Z:\sparse_file.txt 1099511627776

In this command, Z:\ is the mount path on the ECS instance.

Why is directory traversal slow or unresponsive?

This typically happens when you run ls, use wildcards (* or ?), run rm -rf, or call getdents on a large or actively modified directory. Two common causes:

  • The directory is being modified. Creating, deleting, or renaming files frequently invalidates the cache, which slows responses.

  • The directory metadata exceeds the client cache size. This triggers frequent cache evictions and slow responses.

To fix this:

  • Keep fewer than 10,000 files per directory.

  • Avoid modifying the directory while traversing it.

  • For directories with more than 10,000 files that are not frequently modified, mount with the NFSv3 protocol and add the nordirplus parameter to speed up traversal. Test this approach before deploying it in production. For details, see Mount parameters.

NFS mount parameters

How do mount parameters affect NAS performance?

Key NFS mount parameters and their effect on performance:

rsize and wsize

These define the maximum read/write request size between the client and server. A larger value reduces the number of network requests and improves throughput, especially for large files.

Recommended value: 1048576 (1 MB). Smaller values add network overhead and reduce performance.

hard

When enabled, the client retries continuously if the NAS server becomes unavailable, waiting until it responds. This ensures data integrity but may cause applications to hang temporarily.

Always enable this parameter. It suits workloads that require high availability.

timeo

Defines how long the client waits before retrying a request. A short timeout causes frequent retries, which degrades performance on unstable networks.

Recommended value: 600 (60 seconds). This gives the network enough time to recover.

retrans

Defines how many times the NFS client retries a failed request. More retries increase the success rate but may add latency.

Recommended value: 2. This balances performance and reliability.

noresvport

When enabled, the client uses a new TCP port after a network failure. This improves reconnection reliability.

Always enable this parameter.

Important
  • The soft mount option is not recommended. It can cause silent data corruption if the server does not respond in time. Use it only if your application can handle I/O errors gracefully and you fully understand the risks.

  • Avoid changing any mount options from their default values. Modifying read/write buffer sizes or disabling attribute caching may reduce performance.

NFS and Linux performance

How do I improve NAS performance on Linux?

Two options are available, depending on your kernel version.

Option 1: Use the nconnect parameter (kernel 5.3 or later)

The nconnect mount parameter allows a single NFS mount to use multiple TCP connections. This significantly increases throughput for high-concurrency workloads — tests show a 3 to 6× improvement, up to 3 GB/s.

Use this option when more than 16 concurrent I/O operations run on a single ECS instance.

Prerequisites: Linux kernel 5.3 or later. Does not raise the NAS file system's throughput threshold itself.

Add nconnect=4 to the mount command:

sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,nconnect=4
Important

The nconnect parameter increases per-instance throughput but does not raise the NAS file system's throughput threshold. Do not enable it for single-concurrency, small data block, or latency-sensitive workloads, because it increases latency.

Option 2: Tune sunrpc.tcp_slot_table_entries (kernel earlier than 3.10)

The sunrpc module controls the number of communication slots in a single NFS link. Adjusting this value helps when you have multiple concurrent I/O operations.

  • For high throughput, set the slot count to 128.

  • For low latency, set the slot count to 16 or less.

Note

The nconnect parameter is more effective. Use nconnect if your kernel is 5.3 or later.

For instructions, see How to modify the number of concurrent NFS requests.

How do I improve NFS sequential read performance on Linux kernel 5.4 or later?

The read_ahead_kb parameter controls how much data the Linux kernel prefetches during sequential reads. Starting with kernel 5.4, this defaults to 128 KB, which is too low for NAS workloads. Increase it to 15 MB (15000 KB) when using the recommended mount options.

For earlier kernel versions, the value equals NFS_MAX_READAHEAD multiplied by rsize.

After mounting the file system, run the following commands. Replace nas-mount-point with the local mount path and read-ahead-kb with the desired value in KB:

device_number=$(stat -c '%d' nas-mount-point)
((major = ($device_number & 0xFFF00) >> 8))
((minor = ($device_number & 0xFF) | (($device_number >> 12) & 0xFFF00)))
sudo bash -c "echo read-ahead-kb > /sys/class/bdi/$major:$minor/read_ahead_kb"

Example using /mnt as the mount path and setting read_ahead_kb to 15 MB:

device_number=$(stat -c '%d' /mnt)
((major = ($device_number & 0xFFF00) >> 8))
((minor = ($device_number & 0xFF) | (($device_number >> 12) & 0xFFF00)))
sudo bash -c "echo 15000 > /sys/class/bdi/$major:$minor/read_ahead_kb"

Why does NGINX take a long time to write logs to a NAS file system?

The access_log path contains variables. Each time NGINX writes a log entry, it opens and closes the log file. On NAS, closing a file triggers a data flush to the server for consistency. This frequent open-close-flush cycle creates significant overhead.

Two fixes:

Fix 1: Remove variables from the access_log directive and use a fixed file path.

Fix 2: Use the open_log_file_cache directive to cache file descriptors for frequently used log files. This reduces overhead when log paths contain variables. For details, see open_log_file_cache.

Recommended configuration:

open_log_file_cache max=1000 inactive=1m valid=3m min_uses=2;

SMB and Windows performance

Why are I/O operations delayed on an SMB file system?

This usually happens because unnecessary network providers or services interfere with the SMB connection. Common causes:

  • An NFS client is installed but not in use.

  • The WebClient service is enabled, causing Windows to attempt WebDAV connections before SMB.

  • The registry ProviderOrder value contains Nfsnp, which prevents files from opening.

To resolve this:

  1. Check connectivity first. Ping the mount target domain name. If the ping fails, fix your network settings. If latency is high, ping the mount target IP address instead. If IP latency is much lower than domain latency, check your DNS configuration.

  2. Uninstall the NFS client if it is installed but not in use.

  3. Disable the WebClient service.

  4. Remove Nfsnp from the registry. Open HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\NetworkProvider\Order\ProviderOrder. If the value contains Nfsnp, remove it and restart the ECS instance.

Note
  • Use the Fio tool to check whether the performance metrics are abnormal.

    fio.exe --name=./iotest1 --direct=1 --rwmixread=0 --rw=write --bs=4K --numjobs=1 --thread --iodepth=128 --runtime=300 --group_reporting --size=5G --verify=md5 --randrepeat=0 --norandommap --refill_buffers --filename=\\<mount target address>\myshare\testfio1
  • Use large I/O sizes for read and write operations. Small I/O sizes consume more network resources. If you cannot change I/O sizes, use the BufferedOutputStream class to write data with a specified buffer size.

Why are I/O operations slow on Windows Server SMB clients?

By default, the large mtu option is disabled on Windows SMB clients. This limits I/O performance.

Enable it by modifying the registry:

  1. Open HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkstation\Parameters.

  2. Create a key of the DWORD data type named DisableLargeMtu.

  3. Set the value to 0.

  4. Restart the ECS instance for the change to take effect.

Why is the first connection to an SMB share slow?

Windows tries unnecessary or slow network providers before reaching the SMB provider. DNS resolution latency may also add to the delay.

Warning

Modifying the registry is a high-risk operation. Before proceeding, create a system snapshot or back up the registry.

Step 1: Optimize the network provider order

  1. Press Win+R, enter regedit, and open Registry Editor.

  2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order.

  3. Find and double-click the ProviderOrder value.

  4. In the Value data text box, find and delete the Nfsnp and WebClient entries. Retain commas between remaining providers.

  5. Click OK to save.

  6. Restart the ECS instance.

Step 2: Troubleshoot DNS resolution latency

If the issue persists after Step 1:

  1. Open Command Prompt (CMD).

  2. Run ping <mount target address> and record the latency.

  3. Run ping <IP address of the mount target> and record the latency.

  4. Compare the results. If IP latency is much lower than domain latency, DNS resolution is slow. Check the DNS configuration on your ECS instance.

How do I improve IIS access performance to NAS?

When Internet Information Services (IIS) accesses files in a NAS shared directory, it may issue multiple backend requests per file, each requiring a network round trip. Individual requests are fast, but cumulative latency slows the client response.

Fix 1: Increase SMB Redirector cache lifetimes

Use the SMB Redirector component to cache file metadata. For background, see SMB2 Client Redirector Caches Explained.

Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters and set each of these values to 600 or higher:

  • FileInfoCacheLifetime

  • FileNotFoundCacheLifetime

  • DirectoryCacheLifetime

Note

If these registry values do not exist, check that the file system uses the SMB protocol and that your Windows version supports them. If supported but missing, create them manually. For details, see Performance tuning for file servers.

Fix 2: Store frequently accessed web files locally

If IIS frequently accesses static files (JS, CSS), store them on local disks instead of NAS.

If performance still does not meet your requirements, submit a ticket.