StorNext 4 Tuning Guide
StorNext 4 Tuning Guide
StorNext 4 Tuning Guide
StorNext® 4.0
StorNext
6-01376-13 Rev A
StorNext 4.0 File System Tuning Guide, 6-01376-13, Rev A, March 2010, Product of USA.
Quantum Corporation provides this publication “as is” without warranty of any kind, either express or
implied, including but not limited to the implied warranties of merchantability or fitness for a particular
purpose. Quantum Corporation may revise this publication from time to time without notice.
COPYRIGHT STATEMENT
© 2010 Quantum Corporation. All rights reserved.
Your right to copy this manual is limited by copyright law. Making copies or adaptations without prior
written authorization of Quantum Corporation is prohibited by law and constitutes a punishable
violation of the law.
TRADEMARK STATEMENT
Quantum, the Quantum logo, DLT, DLTtape, the DLTtape logo, Scalar, and StorNext are registered
trademarks of Quantum Corporation, registered in the U.S. and other countries.
Backup. Recovery. Archive. It’s What We Do., the DLT logo, DLTSage, DXi, DXi-Series, Dynamic
Powerdown, FastSense, FlexLink, GoVault, MediaShield, Optyon, Pocket-sized. Well-armored, SDLT,
SiteCare, SmartVerify, StorageCare, Super DLTtape, SuperLoader, and Vision are trademarks of Quantum.
LTO and Ultrium are trademarks of HP, IBM, and Quantum in the U.S. and other countries. All other
trademarks are the property of their respective companies.
Specifications are subject to change without notice.
Note: The configuration file examples in this guide show both the
.cfgx (XML) format used by StorNext for Linux and the .cfg
format used by Windows.
RAID Cache The single most important RAID tuning component is the cache
Configuration configuration. This is particularly true for small I/O operations.
Contemporary RAID systems such as the EMC CX series and the various
Engenio systems provide excellent small I/O performance with properly
tuned caching. So, for the best general purpose performance
characteristics, it is crucial to utilize the RAID system caching as fully as
possible.
For example, write-back caching is absolutely essential for metadata
stripe groups to achieve high metadata operations throughput.
However, there are a few drawbacks to consider as well. For example,
read-ahead caching improves sequential read performance but might
reduce random performance. Write-back caching is critical for small
write performance but may limit peak large I/O throughput.
RAID Read-Ahead RAID read-ahead caching is a very effective way to improve sequential
Caching read performance for both small (buffered) and large (DMA) I/O
operations. When this setting is utilized, the RAID controller pre-fetches
disk blocks for sequential read operations. Therefore, subsequent
application read operations benefit from cache speed throughput,
which is faster than the physical disk throughput.
This is particularly important for concurrent file streams and mixed I/O
streams, because read-ahead significantly reduces disk head movement
that otherwise severely impacts performance.
While read-ahead caching improves sequential read performance, it
does not help highly transactional performance. Furthermore, some
SNFS customers actually observe maximum large sequential read
throughput by disabling caching. While disabling read-ahead is
beneficial in these unusual cases, it severely degrades typical scenarios.
Therefore, it is unsuitable for most environments.
RAID Level, Segment Configuration settings such as RAID level, segment size, and stripe size
Size, and Stripe Size are very important and cannot be changed after put into production, so
it is critical to determine appropriate settings during initial
configuration.
The best RAID level to use for high I/O throughput is usually RAID 5. The
stripe size is determined by the product of the number of disks in the
RAID group and the segment size. For example, a 4+1 RAID 5 group
with 64K segment size results in a 256K stripe size. The stripe size is a
very critical factor for write performance because I/Os smaller than the
stripe size may incur a read/modify/write penalty. It is best to configure
RAID 5 settings with no more than 512K stripe size to avoid the read/
modify/write penalty. The read/modify/write penalty is most noticeable
in the absence of “write-back” caching being performed by the RAID
controller.
The RAID stripe size configuration should typically match the SNFS
StripeBreadth configuration setting when multiple LUNs are utilized
in a stripe group. However, in some cases it might be optimal to
configure the SNFS StripeBreadth as a multiple of the RAID stripe
size, such as when the RAID stripe size is small but the user's I/O sizes are
very large. However, this will be suboptimal for small I/O performance,
so may not be suitable for general purpose usage.
RAID 1 mirroring is the best RAID level for metadata and journal
storage because it is most optimal for very small I/O sizes. Quantum
recommends using fibre channel or SAS disks (as opposed to SATA) for
metadata and journal due to the higher IOPS performance and
reliability. It is also very important to allocate entire physical disks for
the Metadata and Journal LUNs in ordep to avoid bandwidth contention
with other I/O traffic. Metadata and Journal storage requires very high
IOPS rates (low latency) for optimal performance, so contention can
severely impact IOPS (and latency) and thus overall performance. If
Journal I/O exceeds 1ms average latency, you will observe significant
performance degradation.
Direct Memory Access To achieve the highest possible large sequential I/O transfer throughput,
(DMA) I/O Transfer SNFS provides DMA-based I/O. To utilize DMA I/O, the application must
issue its reads and writes of sufficient size and alignment. This is called
well-formed I/O. See the mount command settings
auto_dma_read_length and auto_dma_write_length, described in
the Mount Command Options on page 25.
Buffer Cache Reads and writes that aren't well-formed utilize the SNFS buffer cache.
This also includes NFS or CIFS-based traffic because the NFS and CIFS
daemons defeat well-formed I/Os issued by the application.
NFS / CIFS It is best to isolate NFS and/or CIFS traffic off of the metadata network
to eliminate contention that will impact performance. For optimal
performance it is necessary to use 1000BaseT instead of 100BaseT. On
NFS clients, use the vers=3, rsize=262144 and wsize=262144
mount options, and use TCP mounts instead of UDP. When possible, it is
also best to utilize TCP Offload capabilities as well as jumbo frames.
It is best practice to have clients directly attached to the same network
switch as the NFS or CIFS server. Any routing required for NFS or CIFS
traffic incurs additional latency that impacts performance.
It is critical to make sure the speed/duplex settings are correct, because
this severely impacts performance. Most of the time auto-detect is
the correct setting. Some managed switches allow setting speed/
duplex (for example 1000Mb/full,) which disables auto-detect and
requires the host to be set exactly the same. However, if the settings do
not match between switch and host, it severely impacts performance.
For example, if the switch is set to auto-detect but the host is set to
1000Mb/full, you will observe a high error rate along with extremely
poor performance. On Linux, the ethtool tool can be very useful to
investigate and adjust speed/duplex settings.
If performance requirements cannot be achieved with NFS or CIFS,
consider using a StorNext Distributed LAN client or fibre-channel
attached client.
It can be useful to use a tool such as netperf to help verify network
performance characteristics.
The NFS subtree_check Although supported in previous StorNext releases, the subtree_check
Option option (which controls NFS checks on a file handle being within an
exported subdirectory of a file system) is no longer supported as of
StorNext 4.0.
FSM Configuration File The following FSM configuration file settings are explained in greater
Settings detail in the cvfs_config man page. For a sample FSM configuration
file, see Example FSM Configuration File on page 37.
The examples in the following sections are excerpted from the sample
configuration file from Example FSM Configuration File on page 37.
Stripe Groups
Splitting apart data, metadata, and journal into separate stripe groups
is usually the most important performance tactic. The create, remove,
and allocate (e.g., write) operations are very sensitive to I/O latency of
the journal stripe group. Configuring a separate stripe group for journal
greatly benefits the speed of these operations because disk seek latency
is minimized. However, if create, remove, and allocate performance
aren't critical, it is okay to share a stripe group for both metadata and
journal, but be sure to set the exclusive property on the stripe group so
it doesn't get allocated for data as well.
Example (Linux)
<stripeGroup index="0" name="MetaFiles" status="up"
stripeBreadth="262144" read="true" write="true"
metadata="true" journal="false" userdata="false"
realTimeIOs="200" realTimeIOsReserve="1"
realTimeMB="200" realTimeMBReserve="1"
realTimeTokenTimeout="0" multipathMethod="rotate">
<disk index="0" diskLabel="CvfsDisk0"
diskType="MetaDrive"/>
</stripeGroup>
<stripeGroup index="1" name="JournFiles" status="up"
stripeBreadth="262144" read="true" write="true"
metadata="false" journal="true" userdata="false"
realTimeIOs="0" realTimeIOsReserve="0" realTimeMB="0"
realTimeMBReserve="0" realTimeTokenTimeout="0"
multipathMethod="rotate">
<disk index="0" diskLabel="CvfsDisk1"
diskType="JournalDrive"/>
</stripeGroup>
<stripeGroup index="4" name="RegularFiles" status="up"
stripeBreadth="262144" read="true" write="true"
metadata="false" journal="false" userdata="true"
realTimeIOs="0" realTimeIOsReserve="0" realTimeMB="0"
realTimeMBReserve="0" realTimeTokenTimeout="0"
multipathMethod="rotate">
<disk index="0" diskLabel="CvfsDisk14"
diskType="DataDrive"/>
<disk index="1" diskLabel="CvfsDisk15"
diskType="DataDrive"/>
<disk index="2" diskLabel="CvfsDisk16"
diskType="DataDrive"/>
<disk index="3" diskLabel="CvfsDisk17"
diskType="DataDrive"/>
</stripeGroup>
Example (Windows)
[StripeGroup MetaFiles]
Status Up
StripeBreadth 256K
Metadata Yes
Journal No
Exclusive Yes
Read Enabled
Write Enabled
Rtmb 200
Rtios 200
RtmbReserve 1
RtiosReserve 1
RtTokenTimeout 0
MultiPathMethod Rotate
Node CvfsDisk0 0
[StripeGroup JournFiles]
Status Up
StripeBreadth 256K
Metadata No
Journal Yes
Exclusive Yes
Read Enabled
Write Enabled
Rtmb 0
Rtios 0
RtmbReserve 0
RtiosReserve 0
RtTokenTimeout 0
MultiPathMethod Rotate
Node CvfsDisk1 0
[StripeGroup RegularFiles]
Status Up
StripeBreadth 256K
Metadata No
Journal No
Exclusive No
Read Enabled
Write Enabled
Rtmb 0
Rtios 0
RtmbReserve 0
RtiosReserve 0
RtTokenTimeout 0
MultiPathMethod Rotate
Node CvfsDisk14 0
Node CvfsDisk15 1
Node CvfsDisk16 2
Node CvfsDisk17 3
Affinities
Affinities are another stripe group feature that can be very beneficial.
Affinities can direct file allocation to appropriate stripe groups
according to performance requirements. For example, stripe groups can
be set up with unique hardware characteristics such as fast disk versus
slow disk, or wide stripe versus narrow stripe. Affinities can then be
employed to steer files to the appropriate stripe group.
For optimal performance, files that are accessed using large DMA-based
I/O could be steered to wide-stripe stripe groups. Less performance-
critical files could be steered to slow disk stripe groups. Small files could
be steered clear of large files, or to narrow-stripe stripe groups.
Example (Linux)
<stripeGroup index="3" name="AudioFiles" status="up"
stripeBreadth="1048576" read="true" write="true"
metadata="false" journal="false" userdata="true"
realTimeIOs="0" realTimeIOsReserve="0" realTimeMB="0"
realTimeMBReserve="0" realTimeTokenTimeout="0"
multipathMethod="rotate">
<affinities exclusive="true">
<affinity>Audio</affinity>
</affinities>
<disk index="0" diskLabel="CvfsDisk10"
diskType="AudioDrive"/>
<disk index="1" diskLabel="CvfsDisk11"
diskType="AudioDrive"/>
<disk index="2" diskLabel="CvfsDisk12"
diskType="AudioDrive"/>
<disk index="3" diskLabel="CvfsDisk13"
diskType="AudioDrive"/>
</stripeGroup>
Example (Windows)
[StripeGroup AudioFiles]
Status Up
StripeBreadth 1M
Metadata No
Journal No
Exclusive Yes
Read Enabled
Write Enabled
Rtmb 0
Rtios 0
RtmbReserve 0
RtiosReserve 0
RtTokenTimeout 0
MultiPathMethod Rotate
Node CvfsDisk10 0
Node CvfsDisk11 1
Node CvfsDisk12 2
Node CvfsDisk13 3
Affinity Audio
StripeBreadth
This setting should match the RAID stripe size or be a multiple of the
RAID stripe size. Matching the RAID stripe size is usually the most
optimal setting. However, depending on the RAID performance
characteristics and application I/O size, it might be beneficial to use a
multiple or integer fraction of the RAID stripe size. For example, if the
RAID stripe size is 256K, the stripe group contains 4 LUNs, and the
application to be optimized uses DMA I/O with 8MB block size, a
StripeBreadth setting of 2MB might be optimal. In this example the
8MB application I/O is issued as 4 concurrent 2MB I/Os to the RAID. This
concurrency can provide up to a 4X performance increase. This typically
requires some experimentation to determine the RAID characteristics.
The lmdd utility can be very helpful. Note that this setting is not
adjustable after initial file system creation.
Optimal range for the StripeBreadth setting is 128K to multiple
megabytes, but this varies widely. This setting cannot be changed after
being put into production, so its important to choose the setting
carefully during initial configuration.
Example (Linux)
<stripeGroup index="2" name="VideoFiles" status="up"
stripeBreadth="4194304" read="true" write="true"
metadata="false" journal="false" userdata="true"
realTimeIOs="0" realTimeIOsReserve="0" realTimeMB="0"
realTimeMBReserve="0" realTimeTokenTimeout="0"
multipathMethod="rotate">
<affinities exclusive="true">
<affinity>Video</affinity>
</affinities>
<disk index="0" diskLabel="CvfsDisk2"
diskType="VideoDrive"/>
Example (Windows)
[StripeGroup VideoFiles]
Status Up
StripeBreadth 4M
Metadata No
Journal No
Exclusive Yes
Read Enabled
Write Enabled
Rtmb 0
Rtios 0
RtmbReserve 0
RtiosReserve 0
RtTokenTimeout 0
MultiPathMethod Rotate
Node CvfsDisk2 0
Node CvfsDisk3 1
Node CvfsDisk4 2
Node CvfsDisk5 3
Node CvfsDisk6 4
Node CvfsDisk7 5
Node CvfsDisk8 6
Node CvfsDisk9 7
Affinity Video
BufferCacheSize
This setting consumes up to 2X bytes of memory times the number
specified. Increasing this value can reduce latency of any metadata
operation by performing a hot cache access to directory blocks, inode
information, and other metadata info. This is about 10 to 1000 times
faster than I/O. It is especially important to increase this setting if
metadata I/O latency is high, (for example, more than 2ms average
latency). We recommend sizing this according to how much memory is
available; more is better. Optimal settings for BufferCacheSize range
from 16MB to 128MB for a new file system and can be increased to
256MB or 512MB as a file system grows. A higher setting is more
affective if the CPU is not heavily loaded.
Example (Linux)
<bufferCacheSize>33554432</bufferCacheSize>
Example (Windows)
BufferCacheSize 32M
InodeCacheSize
This setting consumes about 800-1000 bytes of memory times the
number specified. Increasing this value can reduce latency of any
metadata operation by performing a hot cache access to inode
information instead of an I/O to get inode info from disk, about 100 to
1000 times faster. It is especially important to increase this setting if
metadata I/O latency is high, (for example, more than 2ms average
latency). You should try to size this according to the sum number of
working set files for all clients. Optimal settings for InodeCacheSize
range from 16K to 128K for a new file system and can be increased to
256K or 512K as a file system grows. A higher setting is more affective if
the CPU is not heavily loaded.
Example (Linux)
<inodeCacheSize>32768</inodeCacheSize>
Example (Windows)
InodeCacheSize 32K
ThreadPoolSize
This setting consumes up to 512 KB memory times the number
specified. Increasing this value can improve concurrency of metadata
operations. For example, if many client processes are executing
concurrently, the thread pool can become exhausted by I/O wait time.
Increasing the thread pool size permits hot cache operations to be
processed that would otherwise be backed up behind the I/O-bound
operations. There are various O/S limits to the number of threads that
can cause fatal problems for the FSM daemon, so it's not a good idea to
set this setting too high. A range from 32 to 128 is recommended,
depending on the amount of available memory. It is recommended to
size it according to the max threads FSM hourly statistic reported in the
cvlog file. Optimal settings for ThreadPoolSize range from 32K to
128K.
Example (Linux)
<threadPoolSize>32</threadPoolSize>
Example (Windows)
ThreadPoolSize 32
FsBlockSize
The FsBlockSize (FSB), metadata disk size, and JournalSize
settings all work together. For example, the FsBlockSize must be set
correctly in order for the metadata sizing to be correct. JournalSize is
also dependent on the FsBlockSize.
For FsBlockSize the optimal settings for both performance and space
utilization are in the range of 16K or 64K.Settings greater than 64K are
not recommended because performance will be adversely impacted due
to inefficient metadata I/O operations. Values less than 16K are not
recommended in most scenarios because startup and failover time may
be adversely impacted. Setting FsBlockSize to higher values is
important for multiterabyte file systems for optimal startup and failover
time.
Note: This is particularly true for slow CPU clock speed metadata
servers such as Sparc. However, values greater than 16K can
severely consume metadata space in cases where the file-to-
directory ratio is low (e.g. less than 100 to 1).
For metadata disk size, you must have a minimum of 25 GB, with more
space allocated depending on the number of files per directory and the
size of your file system.
The following table shows suggested FsBlockSize (FSB) settings and
metadata disk space based on the average number of files per directory
and file system size. The amount of disk space listed for metadata is in
addition to the 25 GB minimum amount. Use this table to determine the
setting for your configuration.
Average No.
of Files Per File System SIze: Less File System Size: 10TB
Directory Than 10TB or Larger
This setting is not adjustable after initial file system creation, so it is very
important to give it careful consideration during initial configuration.
Example (Linux)
<config configVersion="0" name="example"
fsBlockSize="16384" journalSize="16777216">
Example (Windows)
FsBlockSize 16K
JournalSize
The optimal settings for JournalSize are in the range between 16M
and 64M, depending on the FsBlockSize. Avoid values greater than
64M due to potentially severe impacts on startup and failover times.
Values at the higher end of the 16M-64M range may improve
performance of metadata operations in some cases, although at the
cost of slower startup and failover time.
The following table shows recommended settings. Choose the setting
that corresponds to your configuration.
FsBlockSize JournalSize
16KB 16MB
64KB 64MB
Example (Linux)
<config configVersion="0" name="example"
fsBlockSize="16384" journalSize="16777216">
Example (Windows)
JournalSize 16M
SNFS Tools The snfsdefrag tool is very useful to identify and correct file extent
fragmentation. Reducing extent fragmentation can be very beneficial
for performance. You can use this utility to determine whether files are
fragmented, and if so, fix them.
The global configuration settings InodeExpandMin, InodeExpandInc,
and InodeExpandMax have been deprecated and settings are instead
calculated on a file-by-file basis as allocations are performed. This
results in better allocations for more files as the values are no longer a
compromise if there are widely varying file types on the file system.
However, if a majority of the files are still fragmented, then these values
can be adjusted and will override the default behavior.
• Non-zero value for FSM wait SUMMARY free buffer waits or low
hit ratio for FSM cache SUMMARY buffer lookups indicates the
FSM configuration setting BufferCacheSize is insufficient.
• Non-zero value for FSM wait SUMMARY free inode waits or low
hit ratio for FSM cache SUMMARY inode lookups indicates the
FSM configuration setting InodeCacheSize is insufficient.
• Large value for FSM threads SUMMARY max busy indicates the
FSM configuration setting ThreadPoolSize is insufficient.
• Extremely high values for FSM cache SUMMARY inode lookups,
TKN SUMMARY TokenRequestV3, or TKN SUMMARY
TokenReqAlloc might indicate excessive file fragmentation. If so,
the snfsdefrag utility can be used to fix the fragmented files.
• The VOP and TKN summary statistics of the form count avg/q+e
min/q+e max/q+e show microsecond queue and execution latency
for the various metadata operations. This shows what type of
metadata operations are most prevalent and most costly. These are
also broken out per client, which can be useful to identify a client
that is disproportionately loading the FSM.
SNFS supports the Windows Perfmon utility. This provides many useful
statistics counters for the SNFS client component. To install, obtain a
copy of cvfsperf.dll from the SCM team in Denver and copy it into the
c:/winnt/system32 directory on the SNFS client system. Then run
rmperfreg.exe and instperfreg.exe to set up the required registry
settings. After these steps, the SNFS counters should be visible to the
Mount Command The following SNFS mount command settings are explained in greater
Options detail in the mount_cvfs man page.
The default size of the buffer cache varies by platform and main
memory size, and ranges between 32MB and 256MB. And, by default,
each buffer is 64K so the cache contains between 512 and 4096 buffers.
In general, increasing the size of the buffer cache will not improve
performance for streaming reads and writes. However, a large cache
helps greatly in cases of multiple concurrent streams, and where files
are being written and subsequently read. Buffer cache size is adjusted
with the buffercachecap setting.
The buffer cache I/O size is adjusted using the cachebufsize setting. The
default setting is usually optimal; however, sometimes performance can
be improved by increasing this setting to match the RAID 5 stripe size.
Using a large cachebufsize setting decreases random I/O performance
when the amount of data being read is smaller than the cache buffer
size.
You can combat fragmentation with the cachebufsize mount option
(increasing it from the default of 64k to something larger, such as 256K
or 512K) on the clients that are creating the fragmented files, or by
altering the way the application writes data to the SAN. The
InodeExpand parameters are file system wide and can be adjusted after
the file system has been created. The cachebufsize parameter is a
mount option and can be unique for every client that mounts the file
system.
Buffer cache read-ahead can be adjusted with the
buffercache_readahead setting. When the system detects that a file is
being read in its entirety, several buffer cache I/O daemons pre-fetch
data from the file in the background for improved performance. The
default setting is optimal in most scenarios.
The auto_dma_read_length and auto_dma_write_length settings
determine the minimum transfer size where direct DMA I/O is
performed instead of using the buffer cache for well-formed I/O. These
settings can be useful when performance degradation is observed for
small DMA I/O sizes compared to buffer cache. The
auto_dma_write_length setting should be tuned with InodeExpand to
get optimal allocations.
For example, if buffer cache I/O throughput is 200 MB/sec but 512K
DMA I/O size observes only 100MB/sec, it would be useful to determine
which DMA I/O size matches the buffer cache performance and adjust
auto_dma_read_length and auto_dma_write_length accordingly. The
lmdd utility is handy here.
The dircachesize option sets the size of the directory information cache
on the client. This cache can dramatically improve the speed of readdir
operations by reducing metadata network message traffic between the
SNFS client and FSM. Increasing this value improves performance in
scenarios where very large directories are not observing the benefit of
the client directory cache.
SNFS External API The SNFS External API might be useful in some scenarios because it
offers programmatic use of special SNFS performance capabilities such
as affinities, preallocation, and quality of service. For more information,
see the “Quality of Service” chapter of the StorNext User’s Guide API
Guide.
Optimistic Allocation
Starting with StorNext 4.0, the InodeExpand parameters
(InodeExpandMin, InodeExpandInc, and InodeExpandMax) in the
file system configuration file have been deprecated and replaced by a
simple formula that should work better in most cases, especially with
very large files.
The InodeExpand values are still honored if they are in the .cfgx file,
but the StorNext GUI no longer lets you set these values. Furthermore,
when converting to StorNext 4.0, during the .cfg to .cfgx conversion
process, if the InodeExpand values in the .cfg file are found to be the
default example values, these values are not set in the new .cfgx.
Instead, the new formula is used.
The original InodeExpand configuration was difficult to explain, which
could lead to misconfigurations that caused either over or under
allocations (resulting in wasted space or fragmentation,) which is why
the new formula seeks to use allocations that are a percentage of the
existing file's size to minimize wasted space and fragmentation.
How Optimistic The InodeExpand values come into play whenever a write to disk is
Allocation Works done via DMA, and works as an "optimistic allocator." It's referred to as
"optimistic" because it works under the assumption that where there is
one allocation, there will be another, so it allocates more than you asked
for believing that you'll use the over-allocated space soon.
There are three ways to do a DMA I/O:
• By having an I/O larger than auto_dma_write_length (or
auto_dma_read_length, but that doesn't cause an allocation so
it will be ignored for this case)
Optimistic Allocation The new formula is simple and is best explained as a table of values:
Formula
16MB-64MB 4MB
64MB-1GB 16MB
1GB-4GB 64MB
4GB-16GB 256MB
16GB-64GB 1GB
• group: The group column tells you which stripe group on which the
extent resides. Usually it's all on the same stripe group, but not
always.
• frbase: This is the file's logical offset
• fsbase and fsend: These are the StorNext logical start and end
addresses and should be ignored.
• kbytes: This is the size of the extent (fragment)
• depth: This tells you the number of LUNs that existed in the stripe
group when the file was written. If you perform bandwidth
expansion, this number is the old number of LUNs before
bandwidth expansion, and signifies that those files aren't taking
advantage of the bandwidth expansion.
If the file is sparse, you will see "HOLE" displayed. Having holes in a file
isn't necessarily a problem, but it does create extra fragments (one for
each side of the hole). Tuning to eliminate holes can reduce
fragmentation, although it does that by using more disk space.
Hardware SNFS Distributed LAN can easily fill several Gigabit Ethernets with data,
Configuration so take special care when selecting and configuring the switches used to
interconnect SNFS Distributed LAN clients and servers. Ensure that your
network switches have enough internal bandwidth to handle all of the
anticipated traffic between all Distributed LAN clients and servers
connected to them.
A network switch that is dropping packets will cause TCP
retransmissions. This can be easily observed on both Linux and Windows
platforms by using the netstat -s command while Distributed LAN is in
progress. Reducing the TCP window size used by Distributed LAN might
Network Configuration For maximum throughput, SNFS distributed LAN can utilize multiple
and Topology NICs on both clients and servers. In order to take advantage of this
feature, each of the NICs on a given host must be on a different IP
subnetwork. (This is a requirement of TCP/IP routing, not of SNFS - TCP/
IP can't utilize multiple NICs on the same subnetwork.) An example of
this is shown in the following illustration.
Switch Switch
A B
10.0.0.x 192.168.9.x
192.168.9.45 Distributed
192.168.9.44 Distributed
192.168.9.43
LAN
Distributed
LAN
10.0.0.45 Client
10.0.0.44
LAN
Client
C1
10.0.0.43 Client
C1
C1
10.0.0.57 Distributed
10.0.0.56 Distributed
10.0.0.55
LAN
Distributed
LAN
Client
LAN
Client
C2
Client
C2
C2
Clients such as C1 are also connected to both the blue and red
subnetworks, and can each get up to 2 GByte/s of throughput. Clients
such as C2 are connected only to the blue subnetwork, and thus get a
maximum of 1 GByte/s of throughput. SNFS automatically load-
balances among NICs and servers to maximize throughput for all clients.
Note: The diagram shows separate physical switches used for the two
subnetworks. They can, in fact, be the same switch, provided it
has sufficient internal bandwidth to handle the aggregate
traffic.
Performance DLC outperforms NFS and CIFS for single-stream I/O and provides higher
aggregate bandwidth. For inferior NFS client implementations, the
difference can be more than a factor of two. DLC also makes extremely
efficient use of multiple NICs (even for single streams,) whereas legacy
NAS protocols allow only a single NIC to be used. In addition, DLC
clients communicate directly with StorNext metadata controllers instead
of going through an intermediate server, thereby lowering IOP latency.
Fault tolerance DLC handles faults transparently, where possible. If an I/O is in progress
and a NIC fails, the I/O is retried on another NIC (if one is available). If a
Distributed LAN Server fails while an I/O is in flight, the I/O is retried on
another server (if one is running). When faults occur, applications
performing I/O will experience a delay but not an error, and no
administrative intervention is required to continue operation. These
fault tolerance features are automatic and require no configuration.
Load Balancing DLC automatically makes use of all available Distributed LAN Servers in
an active/active fashion, and evenly spreads I/O across them. If a server
goes down or one is added, the load balancing system automatically
adjusts to support the new configuration.
Client Scalability As the following table shows, DLC supports a significantly larger
number of clients than legacy NAS protocols:
Robustness and The code path for DLC is simpler, involves fewer file system stacks, and is
Stability not integrated with kernel components that constantly change with
every operating system release (for example, the Linux NFS code).
Therefore, DLC provides increased stability that is comparable to the
StorNext SAN Client.
Consistent Security DLC clients have the same security model as StorNext SAN clients. When
Model CIFS and NFS are used, some security models aren’t supported. (For
example, Windows ACLs are not accessible when running UNIX Samba
servers.)
being sent to the application log and cvlog.txt about socket failures
with the status code (10555) which is ENOBUFS.
The solution is to adjust a few parameters on the Cache Parameters tab
in the SNFS control panel (cvntclnt). These parameters control how
much memory is consumed by the directory cache, the buffer cache,
and the local file cache.
As always, an understanding of the customers’ workload aids in
determining the correct values. Tuning is not an exact science, and
requires some trial-and-error (and the unfortunate reboots) to come up
with values that work best in the customer’s environment.
The first is the Directory Cache Size. The default is 10 (MB). If you do
not have large directories, or do not perform lots of directory scans, this
number can be reduced to 1 or 2 MB. The impact will be slightly slower
directory lookups in directories that are frequently accessed.
Also, in the Mount Option panel, you should set the Paged DirCache
option.
The next parameters control how many file structures are cached on the
client. These are controlled by the Meta-data Cache low water mark,
Meta-data Cache high water mark and Meta-data Cache Max water
mark. Each file structure is represented internally by a data structure
called the “cvnode.” The cvnode represents all the state about a file or
directory. The more cvnodes that there are encached on the client, the
fewer trips the client has to make over the wire to contact the FSM.
Each cvnode is approximately 1462 bytes in size and is allocated from
the non-paged pool. The cvnode cache is periodically purged so that
unused entries are freed. The decision to purge the cache is made based
on the Low, High, and Max water mark values. The 'Low' default is
1024, the 'High' default is 3072, and the 'Max' default is 4096.
These values should be adjusted so that the cache does not bloat and
consume more memory than it should. These values are highly
dependent on the customers work load and access patterns. Values of
512 for the High water mark will cause the cvnode cache to be purged
when more than 512 entries are present. The cache will be purged until
the low water mark is reached, for example 128. The Max water mark is
for situations where memory is very tight. The normal purge algorithms
takes access time into account when determining a candidate to evict
from the cache; in tight memory situations (when there are more than
'max' entries in the cache), these constraints are relaxed so that memory
can be released. A value of 1024 in a tight memory situation should
work.
Linux Example Below are the contents of the StorNext example configuration file for
Configuration File Linux (example.cfgx):
<fsCapacityThreshold>0</fsCapacityThreshold>
<globalSuperUser>true</globalSuperUser>
<inodeCacheSize>32768</inodeCacheSize>
<inodeExpandMin>0</inodeExpandMin>
<inodeExpandInc>0</inodeExpandInc>
<inodeExpandMax>0</inodeExpandMax>
<inodeDeleteMax>0</inodeDeleteMax>
<inodeStripeWidth>0</inodeStripeWidth>
<maxConnections>32</maxConnections>
<maxLogs>4</maxLogs>
<remoteNotification>false</remoteNotification>
<reservedSpace>true</reservedSpace>
<fsmRealTime>false</fsmRealTime>
<fsmMemLocked>false</fsmMemLocked>
<opHangLimitSecs>180</opHangLimitSecs>
<perfectFitSize>131072</perfectFitSize>
<quotas>false</quotas>
<restoreJournal>false</restoreJournal>
<restoreJournalDir/>
<restoreJournalMaxHours>0</restoreJournalMaxHours>
<restoreJournalMaxMb>0</restoreJournalMaxMb>
<stripeAlignSize>0</stripeAlignSize>
<trimOnClose>0</trimOnClose>
<threadPoolSize>32</threadPoolSize>
<unixDirectoryCreationModeOnWindows>644</
unixDirectoryCreationModeOnWindows>
<unixIdFabricationOnWindows>false</unixIdFabricationOnWindows>
<unixFileCreationModeOnWindows>755</unixFileCreationModeOnWindows>
<unixNobodyUidOnWindows>60001</unixNobodyUidOnWindows>
<unixNobodyGidOnWindows>60001</unixNobodyGidOnWindows>
<windowsSecurity>true</windowsSecurity>
<eventFiles>true</eventFiles>
<eventFileDir/>
<allocSessionReservation>false</allocSessionReservation>
</globals>
<diskTypes>
<diskType typeName="MetaDrive" sectors="99999999" sectorSize="512"/>
<diskType typeName="JournalDrive" sectors="99999999"
sectorSize="512"/>
<diskType typeName="VideoDrive" sectors="99999999" sectorSize="512"/>
<affinity>Audio</affinity>
</affinities>
<disk index="0" diskLabel="CvfsDisk10" diskType="AudioDrive"/>
<disk index="1" diskLabel="CvfsDisk11" diskType="AudioDrive"/>
<disk index="2" diskLabel="CvfsDisk12" diskType="AudioDrive"/>
<disk index="3" diskLabel="CvfsDisk13" diskType="AudioDrive"/>
</stripeGroup>
<stripeGroup index="4" name="RegularFiles" status="up"
stripeBreadth="262144" read="true" write="true" metadata="false"
journal="false" userdata="true" realTimeIOs="0"
realTimeIOsReserve="0" realTimeMB="0" realTimeMBReserve="0"
realTimeTokenTimeout="0" multipathMethod="rotate">
<disk index="0" diskLabel="CvfsDisk14" diskType="DataDrive"/>
<disk index="1" diskLabel="CvfsDisk15" diskType="DataDrive"/>
<disk index="2" diskLabel="CvfsDisk16" diskType="DataDrive"/>
<disk index="3" diskLabel="CvfsDisk17" diskType="DataDrive"/>
</stripeGroup>
</stripeGroups>
</config>
</configDoc>
Windows Example Below are the contents of the StorNext example configuration file for
Configuration File Windows (example.cfg):
# Globals
ABMFreeLimit no
AllocationStrategy Round
HaFsType HaUnmonitored
FileLocks No
BrlResyncTimeout 20
BufferCacheSize 32M
CvRootDir /
DataMigration No
DataMigrationThreadPoolSize 128
Debug 0x0
DirWarp Yes
ExtentCountThreshold 48K
EnableSpotlight No
ForcePerfectFit No
FsBlockSize 16K
GlobalSuperUser Yes
InodeCacheSize 32K
InodeExpandMin 0
InodeExpandInc 0
InodeExpandMax 0
InodeDeleteMax 0
InodeStripeWidth 0
JournalSize 16M
MaxConnections 32
MaxLogs 4
PerfectFitSize 128K
RemoteNotification No
ReservedSpace Yes
FSMRealtime No
FSMMemlock No
OpHangLimitSecs 180
Quotas No
RestoreJournal No
RestoreJournalMaxHours 0
RestoreJournalMaxMB 0
StripeAlignSize 0
TrimOnClose 0
ThreadPoolSize 32
UnixDirectoryCreationModeOnWindows 0644
UnixIdFabricationOnWindows No
UnixFileCreationModeOnWindows 0755
UnixNobodyUidOnWindows 60001
UnixNobodyGidOnWindows 60001
WindowsSecurity Yes
EventFiles Yes
AllocSessionReservation No
# Disk Types
[DiskType MetaDrive]
Sectors 99999999
SectorSize 512
[DiskType JournalDrive]
Sectors 99999999
SectorSize 512
[DiskType VideoDrive]
Sectors 99999999
SectorSize 512
[DiskType AudioDrive]
Sectors 99999999
SectorSize 512
[DiskType DataDrive]
Sectors 99999999
SectorSize 512
# Disks
[Disk CvfsDisk0]
Type MetaDrive
Status UP
[Disk CvfsDisk1]
Type JournalDrive
Status UP
[Disk CvfsDisk2]
Type VideoDrive
Status UP
[Disk CvfsDisk3]
Type VideoDrive
Status UP
[Disk CvfsDisk4]
Type VideoDrive
Status UP
[Disk CvfsDisk5]
Type VideoDrive
Status UP
[Disk CvfsDisk6]
Type VideoDrive
Status UP
[Disk CvfsDisk7]
Type VideoDrive
Status UP
[Disk CvfsDisk8]
Type VideoDrive
Status UP
[Disk CvfsDisk9]
Type VideoDrive
Status UP
[Disk CvfsDisk10]
Type AudioDrive
Status UP
[Disk CvfsDisk11]
Type AudioDrive
Status UP
[Disk CvfsDisk12]
Type AudioDrive
Status UP
[Disk CvfsDisk13]
Type AudioDrive
Status UP
[Disk CvfsDisk14]
Type DataDrive
Status UP
[Disk CvfsDisk15]
Type DataDrive
Status UP
[Disk CvfsDisk16]
Type DataDrive
Status UP
[Disk CvfsDisk17]
Type DataDrive
Status UP
# Stripe Groups
[StripeGroup MetaFiles]
Status Up
StripeBreadth 256K
Metadata Yes
Journal No
Exclusive Yes
Read Enabled
Write Enabled
Rtmb 200
Rtios 200
RtmbReserve 1
RtiosReserve 1
RtTokenTimeout 0
MultiPathMethod Rotate
Node CvfsDisk0 0
[StripeGroup JournFiles]
Status Up
StripeBreadth 256K
Metadata No
Journal Yes
Exclusive Yes
Read Enabled
Write Enabled
Rtmb 0
Rtios 0
RtmbReserve 0
RtiosReserve 0
RtTokenTimeout 0
MultiPathMethod Rotate
Node CvfsDisk1 0
[StripeGroup VideoFiles]
Status Up
StripeBreadth 4M
Metadata No
Journal No
Exclusive No
Read Enabled
Write Enabled
Rtmb 0
Rtios 0
RtmbReserve 0
RtiosReserve 0
RtTokenTimeout 0
MultiPathMethod Rotate
Node CvfsDisk2 0
Node CvfsDisk3 1
Node CvfsDisk4 2
Node CvfsDisk5 3
Node CvfsDisk6 4
Node CvfsDisk7 5
Node CvfsDisk8 6
Node CvfsDisk9 7
Affinity Video
[StripeGroup AudioFiles]
Status Up
StripeBreadth 1M
Metadata No
Journal No
Exclusive No
Read Enabled
Write Enabled
Rtmb 0
Rtios 0
RtmbReserve 0
RtiosReserve 0
RtTokenTimeout 0
MultiPathMethod Rotate
Node CvfsDisk10 0
Node CvfsDisk11 1
Node CvfsDisk12 2
Node CvfsDisk13 3
Affinity Audio
[StripeGroup RegularFiles]
Status Up
StripeBreadth 256K
Metadata No
Journal No
Exclusive No
Read Enabled
Write Enabled
Rtmb 0
Rtios 0
RtmbReserve 0
RtiosReserve 0
RtTokenTimeout 0
MultiPathMethod Rotate
Node CvfsDisk14 0
Node CvfsDisk15 1
Node CvfsDisk16 2
Node CvfsDisk17 3
14500 snpolicyd
This appendix describes the behavior of the stripe group affinity feature
in the StorNext file system, and it discusses some common use cases.
Note: This section does not discuss file systems managed by StorNext
Storage Manager. There are additional restrictions on using
affinities for these managed file systems.
Definitions
Following are definitions for terms used in this appendix:
Stripe Group A stripe group is collection of LUNs (typically disks or arrays,) across
which data is striped. Each stripe group also has a number of associated
attributes, including affinity and exclusivity.
Affinity An affinity is used to steer the allocation of a file’s data onto a set of
stripe groups. Affinities are referenced by their name, which may be up
to eight characters long. An affinity may be assigned to a set of stripe
Exclusivity A stripe group which has both an affinity and the exclusive attribute can
have its space allocated only by files with that affinity. Files without a
matching affinity cannot allocate space from an exclusive stripe group.
Setting Affinities
Affinities for stripe groups are defined in the file system configuration
file. They can be created through the StorNext GUI or by adding one or
more Affinity lines to a StripeGroup section in the configuration
file. A stripe group may have multiple affinities, and an affinity may be
assigned to multiple stripe groups.
Affinities for files are defined in the following ways:
• Using the cvmkfile command with the ‘-k’ option
• Using the snfsdefrag command with the ‘-k’ option
• Using the cvaffinity command with the ‘-s’ option
• Through inheritance from the directory in which they are created
Through the CvApi_SetAffinity() function, which sets affinities
programmatically
Allocation Strategy
StorNext has multiple allocation strategies which can be set at the file
system level. These strategies control where a new file’s first blocks will
be allocated. Affinities modify this behaviour in two ways:
Segregating Audio and To segregate audio and video files onto their own stripe groups:
Video Files Onto Their One common use case is to segregate audio and video files onto their
Own Stripe Groups own stripe groups. Here are the steps involved in this scenario:
• Create one or more stripe groups with an AUDIO affinity and the
exclusive attribute
• Create one or more stripe groups with a VIDEO affinity and the
exclusive attribute
• Create one or more stripe groups with no affinity (for non-audio,
non-video files)
• Create a directory for audio using ‘cvmkdir -k AUDIO audio’
• Create a directory for video using ‘cvmkdir -k VIDEO video’
Files created within the audio directory will reside only on the AUDIO
stripe group. (If this stripe group fills, no more audio files can be
created.)
Files created within the video directory will reside only on the VIDEO
stripe group. (If this stripe group fills, no more video files can be
created.)
Reserving High-Speed In this use case, high-speed disk usage is reserved for and limited to only
Disk For Critical Files critical files. Here are the steps for this scenario:
• Create a stripe group with a FAST affinity and the exclusive attribute
• Label the critical files or directories with the FAST affinity
The disadvantage here is that the critical files are restricted to using only
the fast disk. If the fast disk fills up, the files will not have space
allocated on slow disks.
To work around this limitation, you could reserve high-speed disk for
critical files but also allow them to grow onto slow disks. Here are the
steps for this scenario:
• Create a stripe group with a FAST affinity and the exclusive attribute
• Create all of the critical files, preallocating at least one block of
space, with the FAST affinity. (Or move them using snfsdefrag
after ensuring the files are not empty.)
• Remove the FAST affinity from the critical files
Because files allocate from their existing stripe group even if they no
longer have a matching affinity, the critical files will continue to grow
on the FAST stripe group. Once this stripe group is full, they can allocate
space from other stripe groups since they do not have an affinity.
This scenario will not work if new critical files can be created later,
unless there is a process to move them to the FAST stripe group, or an
affinity is set on the critical files by inheritance but removed after their
first allocation (to allow them to grow onto non-FAST groups).
Replication Copies The replication target can keep one or more copies of data. Each copy is
presented as a complete directory tree for the policy. The number of
copies and placement of this directory are ultimately controlled by the
replication target. However, if the target does not implement policy
here, the source system may request how many copies are kept and
how the directories are named.
When multiple copies are kept, the older copies and current copy share
files where there are no changes. This shows up as extra hard links to
the files. If a file is changed on the target, it affects all copies sharing the
file. If a file is changed on the replication source, older copies on the
target are not affected.
The best means to list which replication copies exist on a file system is
running snpolicy -listrepcopies command. The rmrepcopy,
mvrepcopy and exportrepcopy options should be used to manage
the copies.
Replication and It might seem obvious, but it’s worth mentioning that if your
Distributed LAN Client configuration includes Distributed LAN Clients (DLC), the machines you
Servers use for your DLC servers should not also be metadata controllers. Doing
so may not only cause performance degradation, but also expose the
virtual IPs to additional vulnerability. For best performance, machines
used as DLC servers should always be dedicated machines.
Deduplication and File Deduplication will not be beneficial on small files, nor will it provide any
Size benefit on files using compression techniques on the content data (such
as mpeg format video). In general, deduplication is maximized for files
that are 64MB and larger. Deduplication performed on files below 64MB
may result in sub-optimal results.
You can filter out specific files to bypass by using the dedup_skip
policy parameter. This parameter works the same as filename expansion
in a UNIX shell.
You can also skip files according to size by using the dedup_min_size
parameter.
Deduplication and Backup streams such as tar and netbackup can be recognized by the
Backups deduplication algorithm if the dedup_filter parameter on the policy
is set to true.
In this configuration the content of the backup image is interpreted to
find the content files, and these are deduplicated individually. When this
this flag is not set to true, the backup image is treated as raw data and
the backup metadata in the file will interfere with the reduction
potential of the deduplication algorithm. Recognition of a backup
stream is according to its contents, not the file name.
Deduplication and File Deduplication is performed on a file after a period of inactivity after the
Inactivity file is last closed, as controlled by the dedup_age policy parameter. It is
worth tuning this parameter if your workload has regular periods of
inactivity on files before they are modified again.
Note: Making the age too small can lead to the same file being
deduplicated more than once.
Deduplication and If deduplication is run without StorNext Storage Manager also storing
Truncation the file contents, then snpolicyd can manage file truncation. If
Storage Manager is also running on a directory, it becomes the engine
which removes the online copy of files.
Note: Storage Manager can retrieve deleted files from tape. With
deduplication, if the primary file is removed from a directory,
the deduplicated copy is no longer accessible. This is a
fundamental difference between the two mechanisms
(truncation and deduplication) which must be understood.
In the case where both deduplication and tape copies of data are being
made, TSM is the service which performs truncation.