NOTE:: Please see my next entry on Kernel NFS performance and the improvements that come with the latest Solaris.
After experimenting with dNFS it was time to do a comparison with the “old” way. I was a little surprised by the results, but I guess that really explains why Oracle decided to embed the NFS client into the database :)
bake-off with OLTP style transactions
This experiment was designed to load up a machine, a T5240, with OLTP style transactions until no more CPU available. The dataset was big enough to push about 36,000 IOPS read and 1,500 IOPS write during peak throughput. As you can see, dNFS performed well which allowed the system to scale until DB server CPU was fully utilized. On the other hand, Kernel NFS throttles after 32 users and is unable to use the available CPU to scale transactional throughput.
lower cpu overhead yields better throughput
A common measure for benchmarks is to figure out how many transactions per CPU are possible. Below, I plotted the CPU content needed for a particular transaction rate. This chart shows the total measured CPU (user+system) to for a given TPS rate.
As expected, the transaction rate per CPU is greater when using dNFS vs kNFS. Please do note, that this is a T5240 machine that has 128 threads or virtual CPUs. I don’t want to go into semantics of sockets, cores, pipelines, and threads but thought it was at least worth noting. Oracle sees a thread of a T5240 as a CPU, so that is what I used for this comparison.
silly little torture test
When doing the OLTP style tests with a normal sized SGA, I was not able to fully utilize the 10gigE interface or the Sun 7410 storage. So, I decided to do a silly little micro benchmark with a real small SGA. This benchmark just does simple read-only queries that essentially result in a bunch of random 8k IO. I have included the output from the Fishworks analytics below for both kNFS and dNFS.
I was able to hit ~90K IOPS with 729MB/sec of throughput with just one 10gigE interface connected to Sun 7140 unified storage. This is an excellent result with Oracle 11gR2 and dNFS for a random test IO test… but there is still more bandwidth available. So, I decided to do a quick DSS style query to see if I could break the 1GB/sec barrier.
===dNFS=== SQL> select /*+ parallel(item,32) full(item) */ count(*) from item; COUNT(*) ---------- 40025111 Elapsed: 00:00:06.36 ===kNFS=== SQL> select /*+ parallel(item,32) full(item) */ count(*) from item; COUNT(*) ---------- 40025111 Elapsed: 00:00:16.18
Excellent, with a simple scan I was able to do 1.14GB/sec with dNFS more than doubling the throughput of kNFS.
configuration notes and basic tuning
I was running on a T5240 with Solaris 10 Update 8.
$ cat /etc/release Solaris 10 10/09 s10s_u8wos_08a SPARC Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 16 September 2009
This machine has the a built-in 10gigE interface which uses multiple threads to increase throughput. Out of the box, there is very little to tuned as long as you are on Solaris 10 Update 8. I experimented with various settings, but found that only basic tcp settings were required.
ndd -set /dev/tcp tcp_recv_hiwat 400000 ndd -set /dev/tcp tcp_xmit_hiwat 400000 ndd -set /dev/tcp tcp_max_buf 2097152 ndd -set /dev/tcp tcp_cwnd_max 2097152
Finally, on the storage front, I was using the Sun Storage 7140 Unified storage server as the NFS server for this test. This server was born out of the Fishworks project and is an excellent platform for deploying NFS based databases…. watch out NetApp.
what does it all mean?
dNFS wins hands down. Standard kernel NFS only essentially allows one client per “mount” point. So eventually, we see data queued to a mount point. This essentially clips the throughput far too soon. Direct NFS solves this problem by having each Oracle shadow process mount the device directly. Also with dNFS, all the desired tuning and mount point options are not necessary. Oracle knows what options are most efficient for transferring blocks of data and configures the connection properly.
When I began down this path of discovery, I was only using NFS attached storage because nothing else was available in our lab… and IO was not initially a huge part of the project at hand. Being a performance guy who benchmarks systems to squeeze out the last percentage point of performance, I was skeptical about NAS devices. Traditionally, NAS was limited by slow networks and clumsy SW stacks. But times change. Fast 10gigE networks and Fishworks storage combined with clever SW like Direct NFS really showed this old dog a new trick.