Ramdisk in 6.1

I want a small (15M) RAMDISK accessable as “/ram” on my
system, and I start devb-ram as follows:

echo “Creating RAMDISK (/ram)…”

devb-ram blk automount=/dev/hd1t77:ram ram capacity=32768 &

After startup, “/dev/hd1t77” exists, and I have a directory “/ram”.
It appears to be intialized.

Do I need to do anything else to prepare “/ram” for use, or
can I immediately copy files into it as if it were just another
directory on my hard drive?

Once created, how can one verify that a RAMDISK is, in fact,
a RAMDISK rather than just another directory on the hard drive?


Jeff Maass jmaass@columbus.rr.com Located near Columbus Ohio
USPSA # L-1192 NROI/CRO Amateur Radio K8ND
Maass’ IPSC Resources Page: http://home.columbus.rr.com/jmaass

Jeff Maass <jmaass@columbus.rr.com> wrote:

I want a small (15M) RAMDISK accessable as “/ram” on my
system, and I start devb-ram as follows:

echo “Creating RAMDISK (/ram)…”

devb-ram blk automount=/dev/hd1t77:ram ram capacity=32768 &
After startup, “/dev/hd1t77” exists, and I have a directory “/ram”.
It appears to be intialized.
Do I need to do anything else to prepare “/ram” for use, or
can I immediately copy files into it as if it were just another
directory on my hard drive?

No, nothing else needs to be done (if you don’t specify the “ram nodinit”
option then it will automatically be partitioned and dinit’d as a
fs-qnx4 style filesystem). Later versions (not yet released) of devb-*
will actually support a ramdisk like the old QNX4, so you can combine
having a ramdisk with, say devb-eide, and not need a separate devb-ram :wink:

Once created, how can one verify that a RAMDISK is, in fact,
a RAMDISK rather than just another directory on the hard drive?

That’s pretty paranoid of you :wink: The devb-ram driver fakes out RAM
to look like a block device, so no-one actually knows the difference
(continuing the not-yet-release-ramdisk saga, this will report as being
type “blk-ram” to “df” and will have a blocksize of 4k). Hmmm … look
through “/proc/mount” for the “ram” entry and verify that the pid (in
the “0,0,0,0,0” stuff) is that of devb-ram and not that of devb-eide … ?

Jeff Maass <jmaass@columbus.rr.com> wrote:

I want a small (15M) RAMDISK accessable as “/ram” on my
system, and I start devb-ram as follows:

echo “Creating RAMDISK (/ram)…”

devb-ram blk automount=/dev/hd1t77:ram ram capacity=32768 &

Also, depending on what you want your RAM disk for – /dev/shmem
may be useable as such, without needing anything more done.

(Of course, you wouldn’t be able to limit the size, but otherwise
it might get you what you want without the overhead of running
devb-ram. Then again, devb-ram will get you a more complete
file system environment.)

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:ah1s75$pj5$1@nntp.qnx.com

Jeff Maass <> jmaass@columbus.rr.com> > wrote:
I want a small (15M) RAMDISK accessable as “/ram” on my
system, and I start devb-ram as follows:

echo “Creating RAMDISK (/ram)…”

devb-ram blk automount=/dev/hd1t77:ram ram capacity=32768 &

Also, depending on what you want your RAM disk for – /dev/shmem
may be useable as such, without needing anything more done.

(Of course, you wouldn’t be able to limit the size, but otherwise
it might get you what you want without the overhead of running
devb-ram. Then again, devb-ram will get you a more complete
file system environment.)

My need is for a way to speed the access of executables, and so a
ramdisk seems the appropriate solution (we are using SHMEM for
some common storage elements).

Our primary storage device on this embedded processor is a
SanDisk Ultra-128 Compact Flash, and CF is inherently SLOW*.
I am loading full-page Photon display applications, and fastest is
bestest!

I have plenty of RAM for what we are doing, and so ramdisk seems
a reasonable tool to use!


Jeff Maass jmaass@columbus.rr.com Located near Columbus Ohio
USPSA # L-1192 NROI/CRO Amateur Radio K8ND
Maass’ IPSC Resources Page: http://home.columbus.rr.com/jmaass

You can build executables into the load image. Might that work better than
a RAMDISK?

“Jeff Maass” <jmaass@columbus.rr.com> wrote in message
news:ah2dln$7nk$1@inn.qnx.com

My need is for a way to speed the access of executables, and so a
ramdisk seems the appropriate solution (we are using SHMEM for
some common storage elements).

Our primary storage device on this embedded processor is a
SanDisk Ultra-128 Compact Flash, and CF is inherently SLOW*.
I am loading full-page Photon display applications, and fastest is
bestest!

I have plenty of RAM for what we are doing, and so ramdisk seems
a reasonable tool to use!

I described it as an embedded processor, but it’s really a “PC-on-a-card”,
with Award BIOS, booting conventionally from Compact Flash.

The applications are 22+ touchscreen-enabled GUI pages and a
manager for them, all of which must be upgradable remotely via
FTP. Building them into a load image is not appropriate to the design.

I appreciate the sugggestion, though!


Jeff Maass jmaass@columbus.rr.com Located near Columbus Ohio
USPSA # L-1192 NROI/CRO Amateur Radio K8ND
Maass’ IPSC Resources Page: http://home.columbus.rr.com/jmaass



“Bill Caroselli (Q-TPS)” <QTPS@EarthLink.net> wrote in message
news:ah2er8$8f0$1@inn.qnx.com

You can build executables into the load image. Might that work better
than
a RAMDISK?


“Jeff Maass” <> jmaass@columbus.rr.com> > wrote in message
news:ah2dln$7nk$> 1@inn.qnx.com> …

My need is for a way to speed the access of executables, and so a
ramdisk seems the appropriate solution (we are using SHMEM for
some common storage elements).

Our primary storage device on this embedded processor is a
SanDisk Ultra-128 Compact Flash, and CF is inherently SLOW*.
I am loading full-page Photon display applications, and fastest is
bestest!

I have plenty of RAM for what we are doing, and so ramdisk seems
a reasonable tool to use!
\

“Jeff Maass” <jmaass@columbus.rr.com> wrote in message
news:ah2dln$7nk$1@inn.qnx.com

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:ah1s75$pj5$> 1@nntp.qnx.com> …
Jeff Maass <> jmaass@columbus.rr.com> > wrote:
I want a small (15M) RAMDISK accessable as “/ram” on my
system, and I start devb-ram as follows:

echo “Creating RAMDISK (/ram)…”

devb-ram blk automount=/dev/hd1t77:ram ram capacity=32768 &

Also, depending on what you want your RAM disk for – /dev/shmem
may be useable as such, without needing anything more done.

(Of course, you wouldn’t be able to limit the size, but otherwise
it might get you what you want without the overhead of running
devb-ram. Then again, devb-ram will get you a more complete
file system environment.)


My need is for a way to speed the access of executables, and so a
ramdisk seems the appropriate solution (we are using SHMEM for
some common storage elements).

Our primary storage device on this embedded processor is a
SanDisk Ultra-128 Compact Flash, and CF is inherently SLOW*.
I am loading full-page Photon display applications, and fastest is
bestest!

Try specifing “safe” option to devb-eide in some cases it dramaticaly
increase
CF performance.

I have plenty of RAM for what we are doing, and so ramdisk seems
a reasonable tool to use!


Jeff Maass > jmaass@columbus.rr.com > Located near Columbus Ohio
USPSA # L-1192 NROI/CRO Amateur Radio K8ND
Maass’ IPSC Resources Page: > http://home.columbus.rr.com/jmaass