David Sarrazin
|
RE: devbram blk cache option
|
David Sarrazin
05/07/2009 11:29 AM
post28941
|
RE: devbram blk cache option
Ashwin,
devb-ram was designed originally as a ramdisk and test harness for
io-blk, so by design it pretends to be a "real" block device. As a
result, io-blk does all the normal caching that it would on real
hardware. This is the extra memory you see.
You're right that since it's RAM-backed, all that caching isn't as
important.
If you already have another devb-* driver running in your system, the
best way to get a ramdisk is with the "blk ramdisk=<size>" option with
that driver. This creates a special-purpose ramdisk that io-blk _knows_
is RAM, and all of the caching is bypassed completely. It's the fastest
performance ramdisk, with very little overhead.
If you do NOT have another devb-* in your system, then you need to
decide how important performance is. The "ramdisk" has less performance
overhead than using the full devb-ram.
If you aren't worried about performance, and any RAM disk is fast
enough, I suggest these command-line options:
devb-ram cam quiet blk cache=0,vnode=0,automount=hd0t77:/ram:qnx4 ram
capacity=4096
Which will create, format, and mount a 2MB ramdisk at /ram, with minimal
caching overhead.
If you need all the speed you can get, then try the following:
devb-ram cam quiet blk ramdisk=2m,cache=0,vnode=0 ram
capacity=32,nodinit
You'll see a /dev/hd0 and a /dev/ram0, ignore the /dev/hd0, and setup
/ram0 as the ramdisk:
dinit -h /dev/ram0 (ignore the warning about raw device instead of
partition)
mount -tqnx4 /dev/ram0 /ram
David
> -----Original Message-----
> From: Ashwin Patwekar [mailto:community-noreply@qnx.com]
> Sent: May 7, 2009 10:29 AM
> To: general-filesystems
> Subject: devbram blk cache option
>
> Hi ,
>
> I am using devb-ram to create a ramdisk. After loading the
> devb-ram a lot of memory seems to be used. The following is
> the output when I create a default ramdisk of 2M
>
> # pidin info
> CPU:PPC Release:6.3.0 FreeMem:47Mb/64Mb BootTime:May 07
> 19:10:12 UTC 2009
> Processor1: 80822014 8280 266MHz FPU
> # devb-ram
> # DINIT
> Path=0 -
> target=0 lun=0 Direct-Access(0) - ram Rev:
> # pidin info
> CPU:PPC Release:6.3.0 FreeMem:35Mb/64Mb BootTime:May 07
> 19:10:12 UTC 2009
> Processor1: 80822014 8280 266MHz FPU
>
> which is way way more than 2M. An overhead of 10M is a lot
> for a 2M ramdisk.
>
> With blk option cache=128k the numbers are good. Since its a
> ram based file system and access would be fast what would be
> the ideal cache size for a ram based filesystem ?
>
> Thanks and Regards,
> Ashwin
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post28921
>
>
|
|
|