Hi guys,
We're trying to build a high performance caching image server using
squid. I'm trying to create a large ramdisk for a squid cache directory
to overcome the problems we've had with it going to disk.
I've been seeing very weird crashes when building large ramdisks. Here's
what I've done.
1) Increase the ramdisk size to (what seems to be a kernel limit) of 512MB.
in /etc/grub.conf, change the kernel bootup options to
kernel /vmlinuz-2.6.9-1.667smp ro root=/dev/sda5 selinux=0 rhgb quiet
ramdisk_size=524288
2) The machine has 4GBs of memory, so I want to create a 3GB raid'ed
ramdisk.
mke2fs -vm0 /dev/ram0
mke2fs -vm0 /dev/ram1
mke2fs -vm0 /dev/ram2
mke2fs -vm0 /dev/ram3
mke2fs -vm0 /dev/ram4
mke2fs -vm0 /dev/ram5
3) Mount them into some directories i've made...
mount /dev/ram0 /mnt/r0
mount /dev/ram1 /mnt/r1 ...
4) Without raiding them together, I try to just fill them up.
perl -e 'print 1 x 600000000' > /mnt/r0
perl -e 'print 1 x 600000000' > /mnt/r1
perl -e 'print 1 x 600000000' > /mnt/r2
perl -e 'print 1 x 600000000' > /mnt/r3 ...
At some point the machine seems to just freeze and crash. It responds to
ping but is unresponsive to ssh or other input and must be powercycled.
I know there is enough free memory for this. It seems to happen when I
fill just under half of the memory I should have allocated... Allocating
less (< 40%) seems to work just fine.
Anybody know why this happens?
Brandon