Red Hat Training
A Red Hat training course is available for Red Hat Gluster Storage
9.5. Small File Performance Enhancements
The ratio of the time taken to perform operations on the metadata of a file to performing operations on its data determines the difference between large files and small files.
Metadata-intensive workloadis the term used to identify such workloads. A few performance enhancements can be made to optimize the network and storage performance and minimize the effect of slow throughput and response time for small files in a Red Hat Storage trusted storage pool.
The virtual memory parameters values that are tuned to enhance performance of small files are
dirty-background-ration= 2. See section Memory in the chapter Configuring Red Hat Storage for Enhancing Performance for instructions on configuring these values.
Configuring Threads for Event Processing
You can set the
server.event-thread values for the client and server components. Setting the value to 3, for example, would enable handling three network connections simultaneously.
Setting the event threads value for a client
You can tune the Red Hat Storage Server performance by tuning the event thread values.
# gluster volume set VOLNAME client.event-threads <value>
Example 9.3. Tuning the event threads for a client accessing a volume
# gluster volume set test-vol client.event-threads 3
Setting the event thread value for a server
You can tune the Red Hat Storage Server performance using event thread values.
# gluster volume set VOLNAME server.event-threads <value>
Example 9.4. Tuning the event threads for a server accessing a volume
# gluster volume set test-vol server.event-threads 3
Verifying the event thread values
You can verify the event thread values that are set for the client and server components by executing the following command:
# gluster volume info VOLNAME
See topic, Configuring Volume Options for information on the minimum, maximum, and default values for setting these volume options.
Best practices to tune event threads
It is possible to see performance gains with the Red Hat Storage stack by tuning the number of threads processing events from network connections.The following are the recommended best practices to tune the event thread values.
- As each thread processes a connection at a time, having more threads than connections to either the brick processes (
glusterfsd) or the client processes (
gfapi) is not recommended. Due to this reason, monitor the connection counts (using the
netstatcommand) on the clients and on the bricks to arrive at an appropriate number for the event thread count.
- Configuring a higher event threads value than the available processing units could again cause context switches on these threads. As a result reducing the number deduced from the previous step to a number that is less that the available processing units is recommended.
- If a Red Hat Storage volume has a high number of brick processes running on a single node, then reducing the event threads number deduced in the previous step would help the competing processes to gain enough concurrency and avoid context switches across the threads.
- If a specific thread consumes more number of CPU cycles than needed, increasing the event thread count would enhance the performance of the Red Hat Storage Server.
- In addition to the deducing the appropriate event-thread count, increasing the
server.outstanding-rpc-limiton the storage nodes can also help to queue the requests for the brick processes and not let the requests idle on the network queue.
- Another parameter that could improve the performance when tuning the event-threads value is to set the
performance.io-thread-count(and its related thread-counts) to higher values, as these threads perform the actual IO operations on the underlying file system.