Monday, March 1, 2010

Measuring network throughput via nicstat




When conducting directory services benchmark analysis, one of the areas that you should carefully monitor is network throughput. There have been several benchmarks that I have conducted where the throughput seemed very low relative to what I expected. When I looked at the network throughput I realized that the throughput was constrained due to the limitations of the network. e.g. 100Mbit network interface card (NIC) delivers <= 12.8MBytes/sec, 1Gbit NIC delivers <= 128MBytes/sec, and 10Gbit NIC delivers <= 1280MBytes/sec.


The most effective Solaris command that I have found to succinctly measure network throughput nicstat (Thanks Brendan). You can install CSWnicstat from blastwave or compile it yourself. To compile nicstat, you will need to download and install your preferred compiler and compile nicstat on a development server. Then copy the binary to the respective production server to monitor the network bandwidth.

Here is the gcc invocation that I used to compile nicstat:

# gcc nicstat.c -o nicstat -lkstat -lgen -lsocket -lrt

One issue that I encountered was that there was no 10GigE nic defined in the code. I just added nxge to the list of supported interfaces on line 105 and was able to compile it with no problems.

Line 105 before the change:

static char *g_network[] = { "be", "bge", "ce", "ci", "dmfe", "e1000g", "el",

Line 105 after the change:

static char *g_network[] = { "nxge", "be", "bge", "ce", "ci", "dmfe", "e1000g", "el",

Here is a sample invocation:

$ nicstat -zsi nxge0 10
Time Int rKb/s wKb/s
04:38:16 nxge0 432.278 339.883
04:38:26 nxge0 461.772 1026.978
04:38:36 nxge0 465.267 1035.693
04:38:46 nxge0 468.381 1045.200
04:38:56 nxge0 459.422 1020.522
04:39:06 nxge0 453.317 1009.152
04:39:16 nxge0 466.867 1043.582
04:39:26 nxge0 466.785 1041.348
04:39:36 nxge0 466.367 1040.200

Enjoy!

Brad

Participate in a Welcome to Oracle+Sun event near you...

In case you missed it, Oracle is hosting over 70 "Oracle + Sun Welcome" events around the world. If you want to know what the combined software and hardware portfolio looks like going forward, be sure to participate in one of these events.

You can also watch the Oracle + Sun Strategy Webcast series to get a high level perspective of the various product strategies as well.

I personally plan on participating in the Dallas event on March 24th. I hope to see you there.

Have a super day!


Brad