Setting the Block Size for a File Store Determining the File Store Block Size Determining the File System Block Size

Tuning the WebLogic Persistent Store 8-7 In this example, the low messaging rate matches the disk drives latency 10,000 RPM 60 seconds = 166 RPS even though a much higher rate is expected due to the battery-backed write-back cache. Tuning the stores block size to match the file systems block size could result in a significant improvement. In some other cases, tuning the block size may result in marginal or no improvement: ■ The caches are observed to yield low latency so the IO subsystem is not a significant bottleneck. ■ Write-back caching is not used and performance is limited by larger disk drive latencies. There may be a trade off between performance and file space when using higher block sizes. Multiple application records are packed into a single block only when they are written concurrently. Consequently, a large block size may cause a significant increase in store file sizes for applications that have little concurrent server activity and produce small records. In this case, one small record is stored per block and the remaining space in each block is unused. As an example, consider a Web Service Reliable Messaging WS-RM application with a single producer that sends small 100 byte length messages, where the application is the only active user of the store. Oracle recommends tuning the store block size to match the block size of the file system that hosts the file store typically 4096 for most file systems when this yields a performance improvement. Alternately, tuning the block size to other values such as paging and cache units may yield performance gains. If tuning the block size does not yield a performance improvement, Oracle recommends leaving the block size at the default as this helps to minimize use of file system resources.

8.4.4.1 Setting the Block Size for a File Store

To set the block size of a store, use one of the following properties on the command line or start script of the JVM that runs the store: ■ Globally sets the block size of all file stores that dont have pre-existing files. -Dweblogic.store.BlockSize=block-size ■ Sets the block size for a specific file store that doesn’t have pre-existing files. -Dweblogic.store.store-name.BlockSize=block-size ■ Sets the block size for the default file store, if the store doesn’t have pre-existing files: -Dweblogic.store._WLS_server-name. BlockSize=block-size The value used to set the block size is an integer between 512 and 8192 which is automatically rounded down to the nearest power of 2. Setting BlockSize on an individual store overrides the setting of the global -Dweblogic.store.BlockSize option. For example: If you have two stores, A and B, and set the following options: -Dweblogic.store.BlockSize=8192 Deprecation Note: The BlockSize command line properties that are described in this section are still supported in 11gR1PS2, but are deprecated. Oracle recommends using the BlockSize configurable on custom and default file stores instead. 8-8 Performance and Tuning for Oracle WebLogic Server -Dweblogic.store.A.BlockSize=512 then store B has a block size of 8192 and store A has a block size of 512.

8.4.4.2 Determining the File Store Block Size

You can verify a file stores current block size and synchronous write policy by viewing the server log of the server that hosts the store. Search for a 280009 store opened message.

8.4.4.3 Determining the File System Block Size

To determine your file systems actual block size, consult your operating system documentation. For example: ■ Linux ext2 and ext3 file systems: run sbindumpe2fs devdevice-name and look for Block size ■ Windows NTFS: run fsutil fsinfo ntfsinfo device letter: and look for Bytes Per Cluster

8.4.4.4 Converting a Store with Pre-existing Files