TestFileSystem

Script: testfilesystem.sh Package: jgi Class: TestFilesystem.java

Logs filesystem performance by creating, deleting, and copying files. Benchmarks filesystem I/O using file copy operations, metadata operations (creating/reading/deleting 1000 small files), and directory listing tests in a continuous monitoring loop.

Basic Usage

testfilesystem.sh <in> <out> <log> <size> <ways> <interval in seconds>

All six parameters are positional arguments passed directly to the Java class. The tool requires existing test files or will create them if they don't exist.

Parameters

TestFilesystem uses positional arguments to configure the benchmarking process.

Positional Arguments

<in>
Input file template. Should contain the # symbol if ways > 1 to allow multiple parallel files (e.g., "testfile#.dat"). Default: "foo#.txt"
<out>
Output file for copy operations. Use "null" to disable output file creation. Default: "bar.txt"
<log>
Log file for performance metrics. Use "stdout" or "null" to output to console. Default: "log.txt"
<size>
Size in bytes of test files to create/copy. Large files test sustained I/O performance. Default: 5000000000 (5GB)
<ways>
Number of parallel test files to create. Higher values test concurrent I/O performance. Default: 40
<interval in seconds>
Time interval between benchmark cycles in seconds. Use 3600 for hourly monitoring. Default: 3600 seconds (1 hour)

Examples

Basic Filesystem Benchmark

testfilesystem.sh testfile#.dat copy.dat results.log 1000000000 10 60

Benchmarks filesystem with 10 parallel 1GB files, copying to copy.dat, logging results every minute to results.log

Hourly Monitoring

testfilesystem.sh data#.bin null stdout 5000000000 40 3600

Monitors filesystem performance with 40 parallel 5GB files every hour, outputting metrics to console

High-Frequency Testing

testfilesystem.sh benchmark#.tmp output.tmp perf.log 100000000 5 30

Tests with 5 parallel 100MB files every 30 seconds for high-frequency performance monitoring

Single File Mode

testfilesystem.sh singlefile.dat copy.dat metrics.txt 2000000000 1 300

Tests single-file performance with 2GB file, copying every 5 minutes

Algorithm Details

Benchmark Methodology

TestFilesystem implements three distinct performance tests executed in continuous cycles with specific measurements and data structures:

File Copy Performance

The core benchmark uses a multi-threaded producer-consumer architecture for file copying operations:

Metadata Operations Testing

Tests filesystem metadata performance with small file operations:

Directory Listing Performance

Measures directory traversal and listing performance:

Test File Management

Test file creation and validation with specific size checking:

Performance Logging

Metrics logging with tab-delimited format and specific data fields:

Memory and Resource Management

Resource utilization patterns for long-running benchmarks:

Timing and Scheduling

Precise timing control for consistent benchmarking intervals:

Performance Characteristics

System Requirements

Scalability

Use Cases

Technical Notes

Output Format

Log files contain tab-delimited data with the following columns:

#time	size	copyTime	MB/s	metaOps	metaTime	ops/s	lsTime	date

File Naming Convention

When using multiple parallel files (ways > 1), the input template must contain a '#' character that will be replaced with the file index (0 to ways-1).

Error Handling

The tool includes error handling for common filesystem issues:

Limitations

Support

For questions and support: