AIX

 View Only

 ramdisk slow

Jump to  Best Answer
jack smith's profile image
jack smith posted Mon April 14, 2025 09:32 AM

Hello,

I created a ramdisk like this:

mkramdisk 2G
mkfs -V jfs2 /dev/ramdisk0
mount -V jfs2 -o noatime,log=NULL /dev/ramdisk0 /mnt/ram

Then I ran:

timex dd if=/dev/zero of=bla bs=1M count=999

and calculated the speed which was a little more than 800MB/s.

There's also a Linux LPAR on the same machine and doing the same there delivered around 6300MB/s. That's much closer to what I expected given that the machine in question has DDR3 ram.

So why is the AIX ramdisk so slow? Is /dev/zero somehow limited? Or is that all JFS2 can do? Or maybe something else?

Chris Gibson's profile image
Chris Gibson  Best Answer

OK.

Would you be running Oracle binaries out of the cio mounted ram fs?

You could try the "dio" mount option as an alternative.

# mount -V jfs2 -o dio,rbrw,noatime,log=NULL /dev/ramdisk0 /mnt/ram
# timex dd if=/dev/zero of=bla bs=1M count=999
999+0 records in.
999+0 records out.

real 0.32
user 0.00
sys  0.10

DIO is safer than CIO for running binaries because it doesn’t disable inode locking or impose CIO’s strict access methods, reducing the chance of errors like EINVAL or access conflicts. However, DIO still skips caching, so it’s not ideal for binaries that benefit from buffered I/O. Simple, self-contained binaries with minimal reliance on filesystem caching are less likely to encounter issues.

Alexander Pettitt's profile image
Alexander Pettitt

Try this instead

# mount -V jfs2 -o noatime,cio,log=NULL /dev/ramdisk0 /mnt/ram
# time dd if=/dev/zero of=/mnt/ram/output bs=1m count=1024
1024+0 records in.
1024+0 records out.

real    0m0.21s
user    0m0.00s
sys     0m0.08s

jack smith's profile image
jack smith

Yes, this is much faster, but according to the docs: "One side-effect of this is that it is impossible to run binaries out of a cio mounted file system". So unfortunately that's not an option.

Alexander Pettitt's profile image
Alexander Pettitt

Trying to understand a use case to run binaries from a RAM drive.

Also trying to understand why write performance matters if you are running binaries from the ramdrive.

jack smith's profile image
jack smith

Because I use ramdisks for tests and development. So is there another way to get a fully usable ramdisk from AIX that's not 8 times slower than the Linux version?

Cesar Daniel Delgado Ponce's profile image
Cesar Daniel Delgado Ponce

Hi

Well i think main difference is FS type. What's the FS type your are using on that Linux LPAR? 

Those options (noatime and no log) are the ones that i used when using RAM devices. Just one idea: depending on the server and the AIX version why don't use Persistent Volumes???

HTH

jack smith's profile image
jack smith

With Linux I used tmpfs and I can't use persistent volumes because the machine in question is a Power8.

Chris Gibson's profile image
Chris Gibson

What version of AIX are you using? What is the TL/SP level? 

jack smith's profile image
jack smith

I tried with 7.2.5, 7.3.2 and 7.3.3.

jack smith's profile image
jack smith

This one is even faster than cio and with less limitations. Thanks!