0

I have created RAMdisks of 60GB using modprove brd rd_size=62914560 on CentOS 7.5. Checking the results, fdisk -l /dev/ram* shows 16 ram block devices of 60GB size (/dev/ram0, /dev/ram1, ..., /dev/ram15).

I want to run 16 jobs (threads) with random accesses on one ram block device to check the performance. I run such a workload using FIO tool. However, I get the following error:

cache invalidation of /dev/ram1 failed: Device or resource busy

Why this happens? Is there a limitation in the number of jobs (threads) accessing a single ram block device? When I check the block devices with lsblk, the ram block devices are not shown. What is the reason?

Thanks

0

2 Answers 2

3

From the lsblk man page:

The command prints all block devices (except RAM disks) in a tree-like format by default.

It's not a bug, it's a feature! :-)

If you want to include RAM devices, you can do it with lsblk -I 1

lsblk -I 1
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
ram0    1:0    0  9,8M  0 disk 
ram1    1:1    0  9,8M  0 disk 
ram2    1:2    0  9,8M  0 disk
...
1
  • thank you :). Do you know if there's a limitation in the number of threads accessing a single ram block device? Nov 1, 2020 at 10:28
2

You asked multiple questions in one go which reduces your chances of having them all answered :-(

However, I get the following error:

cache invalidation of /dev/ram1 failed: Device or resource busy

Why this happens? Is there a limitation in the number of jobs (threads) accessing a single ram block device?

The functionality to free pages used by the brd device was removed in the ff26956875c2f05e12ecec9938411a2c7dfc767d: brd: remove support for BLKFLSBUF. This was done because issuing BLKFLSBUF to a child RAM partition caused damage to the parent BRD device (and I guess potentially other sibling partitions that might have been sharing that page).

Is there a limitation in the number of jobs (threads) accessing a single ram block device?

No, see above.

When I check the block devices with lsblk, the ram block devices are not shown. What is the reason?

Because lsblk doesn't show RAM block devices by default by design... From the opening of the man page lsblk(8):

The command prints all block devices (except RAM disks) in a tree-like format by default.

See the options in the lsblk man page for how you can change what lsblk shows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.