CFQ Performance

team bbl


The studied benchmarks reveal that the tuned CFQ setup provides the most efficient solution for the RAID-5 environment. Therefore, this case study further explores various ways to improve the performance of the CFQ framework. The CFQ I/O scheduler in Linux 2.6.5 resembles an SFQ implementation, which operates on a certain number of internal I/O queues and hashes on a per-process granularity to determine where to place an I/O request. The CFQ scheduler in Linux 2.6.5 hashes on the thread group ID (tgid), which represents the process ID (PID), as in POSIX.1. The approach chosen is to alter the CFQ code to hash on the Linux PID. This code change introduces fairness on a per thread granularity and therefore alters the distribution of the I/O requests in the internal queues. In addition, the cfq_quantum and cfq_queued parameters of the CFQ framework are exported into user space. In the first step, the default tgid-based CFQ version with cfq_quantum set to 32 (the default equals 8) is compared to the PID-based implementation that used the same tuning configuration. Across the four profiles, the PID-based implementation reflects the more efficient solution, processing the I/O workloads approximately 4.5% and 2% faster on Ext3 and XFS, respectively. To further quantify the performance impact of the different hash methods (tgid-versus PID-based), in the second step, the study compares the default Linux 2.6.5 CFQ setup to the PID-based code that is configured with cfq_quantum adjusted to 32. Across the four profiles benchmarked on Ext3, the new CFQ scheduler that hashed on a PID granularity outperformed the status quo by approximately 10%. With the new method, the sequential read and write performance improves by 3% and 4%, respectively. On XFS, across the four profiles, the tgid-based CFQ implementation proves to be the more efficient solution, outperforming the PID-based setup by approximately 9%. On the other hand, the PID-based solution is slightly more efficient while operating on the sequential read (2%) and write (1%) profiles. The ramification is that based on the conducted benchmarks and file system configurations, certain workload scenarios can be processed more efficiently in a tuned, PID hash-based configuration setup.

In Figure 19-4, the x-axis depicts the I/O schedulers; 0 = default CFQ, 1 = CFQ with PID, 2 = AS, 3 = deadline, and 4 = noop. The front row reflects the XFS, whereas the back row depicts the Ext3-based environment. The y-axis discloses the actual response time for the mixed workload profile.

Figure 19-4. Mixed workload behavior.


Table 19-7 shows data from a RAID-5 8-way with various CFQ and PID settings.

Table 19-7. RAID-5 8-WayDefault CFQ, PID Hashed CFQ, and cfq_quantum=32, Default CFQ, and cfq_quantum=32Mean RT
 

CFQ

PID and Tuned

CFQ Tuned

CFQ

PID and Tuned

CFQ Tuned

File Server

70.7

71.1

70.6

76

75.9

74.3

Metadata

124.9

122

125.1

99.3

92.9

97.4

Web Server

57.5

55.8

58

71.7

73

72.5

Mail Server

99.6

94.5

93.3

81

93.6

93.3

Seq. Read

618.7

599.5

595.4

594.4

583.7

604.1

Seq. Write

813.2

781.1

758.4

436.4

432.1

414.6


To further substantiate the potential of the proposed PID-based hashing approach, a mixed I/O workload consisting of 32 concurrent threads is benchmarked. The environment used reflects the RAID-5 setup. The I/O profile is decomposed into four subsets of eight worker threads, with each subset executing either 64KB sequential read, 4KB random read, 4KB random write, or 256KB sequential write operations (see Figure 19-4). The benchmark results reveal that in this mixed I/O scenario the PID-based CFQ solution (tuned with cfq_quantum = 32) outperforms the other I/O schedulers by at least 5% and 2% on Ext3 and XFS, respectively. The performance delta among the schedulers is greater on Ext3 (15%) than on XFS (6%).

Table 19-8 shows data from a RAID-5 8-way with mixed workload behavior.

Table 19-8. RAID-5 8-WayMixed Workload Behavior (CFQ-T = PID and cfq_quantum = 32), Response Time (in Seconds)
 

CFQ

CFQ-T

AS

DL

NO

Mixed Ext3

334.1

288.1

371.2

301.2

333.5

Mixed XFS

295

291

308.4

296

302.8


    team bbl



    Performance Tuning for Linux Servers
    Performance Tuning for Linux Servers
    ISBN: 0137136285
    EAN: 2147483647
    Year: 2006
    Pages: 254

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net