Topics: AIX, Performance, Storage, System Admin

Creating a large file

When you wish to create a very large file for test purposes, try this command:

# dd if=/dev/zero bs=1024 count=2097152 of=./test.large.file
This wil create a file consisting of 2097152 blocks of 1024 bytes, which is 2GB. You can change the count value to anything you like.

Be aware of the fact, that if you wish to create files larger than 2GB, that your file system needs to be created as a "large file enabled file system", otherwise the upper file size limit is 2GB (under JFS; under JFS2 the upper limit is 64GB). Also check the ulimit values of the user-id you use to create the large file: set the file limit to -1, which is unlimited. Usually, the file limit is default set to 2097151 in /etc/security/limits, which stands for 2097151 blocks of 512 bytes = 1GB.

Another way to create a large file is:
# /usr/sbin/lmktemp ./test.large.file 2147483648
This will create a file of 2147483648 bytes (which is 1024 * 2097152 = 2GB).

You can use this large file for adapter throughput testing purposes:

Write large sequential I/O test:
# cd /BIG
# time /usr/sbin/lmktemp 2GBtestfile 2147483648
Divide 2048/#seconds for MB/sec write speed.

Read large sequential I/O test:
# umount /BIG
(This will flush file from memory)
# mount /BIG
# time cp 2GBtestfile /dev/null
Divide 2048/#seconds for MB/sec read speed.

Tip: Run nmon (select a for adapter) in another window. You will see the throughput for each adapter.

More information on JFS and JFS2 can be found here.



If you found this useful, here's more on the same topic(s) in our blog:


UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.

Interested in learning more?