I am attempting to set up Ramdisk for use with an application with lots of disk IO. I am in the testing phase right now, and am having some problems. The server that I am using currently has 3GB of memory in it. I have increased the size of the ramdisks to 256MB.
Code:
[root@myserver ~]# dmesg | grep RAMDISK
RAMDISK driver initialized: 16 RAM disks of 262144K size 4096 blocksize
I am creating my Ramdisk drive with the following commands:
Code:
[root@myserver ~]# pvcreate /dev/ram0 /dev/ram1 /dev/ram2 /dev/ram3
[root@myserver ~]# vgcreate vg1 /dev/ram0 /dev/ram1 /dev/ram2 /dev/ram3
[root@myserver ~]# lvcreate -L 1000M -n ramlv vg1
[root@myserver ~]# mkfs.ext2 /dev/vg1/ramlv
[root@myserver ~]# mount -o noatime /dev/vg1/ramlv /mnt/ramdisk
After creating the drive, when I issue the free command, I notice that I'm still showing a total of 3GB of memory. I'm not sure if this is what it is supposed to show. Anyway, once I start placing data on the ramdisk, I starting getting low memory errors on the console, which then eventually lead to a kernel panic and crash.
So my question is, is there a way for the memory being used for Ramdisk to be separated from the memory that the system is using? I would expect that once I formatted the Ramdisk that it would not try to use it for system memory anymore.