You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
FSX
Optimizing FSX performance
Copy page
Download PDF
Optimizing FSX performance
This topic explains how to use mount parameters to improve prefetch, read, and write performance.​
Recommendations​
FSX offers three modes: prefetch, read cache, and write cache. Choose the appropriate mode based on your scenario.​
​
Use cases​
Recommended mode​
Characteristics​
Sequential or small I/O random reads​
Default (Prefetch)​
Prefetch performance depends on the size of the prefetched data and the number of prefetch threads. For more information, see Optimizing prefetch performance.​
Repeated reads of small data sets​
Read cache​
Read cache performance depends on the disk's read performance. For more information, see Optimizing read cache performance.​
Write-intensive and latency-sensitive scenarios​
Write cache​
Increasing the number of threads for a multipart upload can improve write bandwidth. For more information, see Optimizing write cache performance.​
​
Optimizing prefetch performance​
Prefetching is enabled by default for sequential or small I/O random reads. This means that FSX proactively loads subsequent object content into memory by parallelizing multiple range download requests. You can control the per-object prefetch bandwidth and memory usage through the following parameters.​
  • Prefetch data size​
  • Formula: Maximum amount of prefetched data per object = Prefetch block size (prefetch_buffer_size) × Maximum number of prefetch blocks (prefetch_forward_buffer_count)​
  • The maximum amount of prefetched data per object is 128 MB by default. You can adjust this value by configuring the prefetch_forward_buffer_count and prefetch_buffer_size parameters. Specifically:​
  • prefetch_buffer_size: Specifies the size of a data block per prefetch request. The default value is 4 MB. Although a larger block size can reduce the number of requests FSX makes to TOS, it may negatively impact the throughput performance of prefetch operations.​
  • prefetch_forward_buffer_count: Specifies the maximum number of prefetch data blocks per object. The default value is 32.​
  • prefetch_backward_buffer_count: Specifies the number of data blocks to cache behind the read cursor. The default value is 1. This parameter must be used in conjunction with prefetch_buffer_size.​
  • Read bandwidth​
  • You can use the num_prefetch_threads parameter to adjust the number of prefetch threads. The default value is 32. The maximum read bandwidth is determined by the number of prefetch threads and the per-object bandwidth limit. Increasing the number of prefetch threads can increase read bandwidth.​
tip​
To enhance prefetch efficiency, set higher values for num_prefetch_threads and prefetch_forward_buffer_count, depending on your available resources.​
Optimizing read cache performance​
FSX provides read caching to improve performance in scenarios where specific objects containing small amounts of data are frequently accessed. Subsequent requests for the same data are served directly from the cache, eliminating the need to access TOS. This reduces access latency and improves read performance. The performance of the read cache depends on the disk performance of the cache directory. Therefore, we recommend using a high-performance disk or tmpfs (a virtual file system) for temporary files.​
tip​
Enabling read cache is not recommended for one-time or non-repetitive data reads.​
You can enable the read cache feature using the following parameters:​
  • read_cache_dir: Specifies the read cache directory, which can be a directory on disk or tmpfs.​
  • max_read_cache_size: Specifies the maximum space, in MB, that the read cache can occupy. The default value is 0. We recommend setting this parameter based on the amount of data to be cached.​
Optimizing write cache performance​
By default, FSX writes data to a local temporary directory. You can specify a directory using the temp_dir parameter when mounting a bucket. This directory will be generated under /tmp/. If performance is important to you, specify tmpfs as the directory for temporary files. You can adjust the write performance using the following parameters:​
  • temp_dir: Specifies the write cache directory. You can specify tmpfs as the write cache directory.​
  • num_bg_threads: Specifies the number of threads for a multipart upload. The default value is 32. The maximum upload bandwidth is determined by num_bg_threads and the per-object bandwidth limit. Increasing the number of multipart upload threads can increase write bandwidth.​
  • max_temp_capacity: Specifies the maximum disk space, in GiB, that the write cache can occupy. The default value is 10. This parameter, when combined with part_size, determines the maximum number of concurrent write requests. The formula is: Maximum concurrency = max_temp_capacity / part_size. When part_size is fixed, increasing max_temp_capacity increases the number of concurrent write requests.​
tip​
To enhance write efficiency, set a higher value for num_bg_threads, depending on your available resources.​
​
Last updated: 2026.07.30 11:12:37