[SATLUG] July Meeting - Thursday, the 12th

Craig sargonemail at gmail.com
Sun Jul 8 18:53:24 CDT 2012


> On Sun Jul 8 10:22:43 CDT 2012 Howard Haradon wrote:
> Bruce and Craig,  thanks for the reply.  Now what does this
> mean for the simple home desktop user?  Can one of you
> walk us thu this at the July 12 meeting?
> --
> Howard

Ok, initial thoughts were a "cache coherency issue",
but ok, gotta go with the cache flow.
Yeah, I know, SATLUG is a non-profit. :)

Before I put attached text into presentation format;
it'd be helpful to have a second set of eyes to review the
attached text file information before deciding to do a presentation Thursday
(and subsequent presentation slides)
Ideally, after I decide to do the presentation; I'd like to have a small
audience to test the slide presentation before July 12, 2012.

Swap passed back to you. :)
Wow (8k)/half a swap page of info on ram disks. :)
Attached file info comments:
Would screen shots be helpful?
Is this to technical for SATLUG?
Should some of the techie terms be defined?

Thanks,
Craig

FYI:
?? to techie?:
    --pipe to/from ram disk should in theory allow for more storage
than the standard page size!
     Useful for &| command line version of awk's net redirect
(netcat/socat and related stuff)
    --fast debugging of multiple tee commands

> Now what does this mean for the simple home desktop user?
Desktop is dead,
long live the short life of tablet/pad replacements,
all hail the mix/match wearable augmented computing scene.
-------------- next part --------------
> On Sun Jul 8 10:22:43 CDT 2012 Howard Haradon wrote: 
> Bruce and Craig,  thanks for the reply.  
> Now what does this mean for the simple home desktop user?
> Can one of you walk us thu this at the July 12 meeting?
> -- 
> Howard

Desktop is dead, 
long live the short life of tablet/pad replacements,
all hail the mix/match wearable augmented computing.

Ok, initial thoughts were a "cache coherency issue",
but ok, gotta go with the cache flow.
 
Craig

###############################################

Note: Logial representation is of disk, but physically
        it's ram, which is swappable!

Why a "RAM disk"?
a) speed things up
   (physical ram/bus limitations not withstanding)

b) "virus" protection
  e.g. Run that in ram (copy HD and/or live cd/DVD),
         shut down -- everything gone!

c) Guarantee entire file such as CD/DVD image 
   && video are available without delay! 

###############################################

Still need to make the actual virtal size with dd ifile=/dev/null ofile=/mnt/ram
>sudo mkdir /mnt/ram
>sudo mount -t tmpfs tmpfs /mnt/ram
>cd /mnt/ram

###############################################
Option #0:

http://www.schmut.com/cheat-sheets/linux-ram-disk
> sudo mkdir /ramdisk
> sudo mount -t tmpfs none /ramdisk -o size=256M,mode=1777,noexec,nosuid,nodev
See http://www.ihelm.org.uk/2010/04/resizing-ram-disk-in-linux-devshm/
for resizing

*****

--"tempfs" ram will never be swapped (if non-swap
  flag set)  or all of it will be swapped
  Ideal for building a CD/DVD image that needs to be
  written all at once (buffering on CD/DVD not withstanding)

--Tradeoffs:
  a) If you're on a 32 bit machine usine UAE
     to support more than 4G (e.g. 64 bit extenstions);
     the need to swap out the entire "ram disk" becomes
     a very time expensive operation.
  b) MUST increase your physical swap partion, unless
     one doesn't mind the potential for swap thrashing.
     (e.g. three finger salute to straighten things out)
  c) Better have computer on UPS!

###############################################
Option #1:

http://mist.cs.st-andrews.ac.uk/blog/?p=263 has a simpler method
or short howto -> http://linuxaria.com/pills/ram-disk-on-linux?lang=en
a) > sudo vim /etc/fstab
b) Locate or create the line of /dev/shm
# e.g. 512MB:
tmpfs      /dev/shm      tmpfs   defaults,size=512m   0   0
c) To make change effective immediately without a reboot
> sudo mount -o remount /dev/shm

*****

--"/dev/shm" ram pages/parts may be swapped
  vs Option 1 all or nothing method
--Typical page size is 16k segment?
  Ideal for large files such as video!
--"Swap size" is determined by size requested rounded
  up to a multiple of PAGE_SIZE

--Tradeoffs:
  a) Must encrease SHM supported by kernel.
     increase in kernel resources.
  b) Has the potential to cause swap thrashing (if
     physical swap not encreased);
     but may be recoverable, unlike in option 0.
  c) Better have computer on UPS!

###############################################
Option #2:

http://www.cyberciti.biz/faq/howto-create-linux-ram-disk-filesystem/ )
You can create the ram disk as follows (8192 = 8M, no need to format
the ramdisk as a journaling file system) :
> mkfs -q /dev/ram1 8192
> mkdir -p /ramcache
> mount /dev/ram1 /ramcache
> df -H | grep ramcache

*****

--non-"tempfs" ram allows control over segment sizes that
  get swapped (e.g. by file block size)
--Typical default block size is 2k?
  Ideal for using as temp disk space area,
  where files typically small, but may be of an
  arbitrary size.  Erased after usage.
  e.g. web ftp files download in progress

--Trade-offs:
  a) inode ratio (inodes to blocks) vs. "disk size"
  b) Better have computer on UPS!

###############################################
Option #3:

1) > sudo init 0
2) do hardware install of physical ram w/ ide/sata/pci/epci
   or other appropriate interface.
   e.g.http://www.ramsan.com/products/rackmount-flash-storage/ramsan-630
       http://techreport.com/articles.x/9312
http://www.starwindsoftware.com/high-performance-ram-disk-emulator
http://www.newegg.com/Product/Product.aspx?Item=N82E16815168001
http://www.tomshardware.com/reviews/hyperos-dram-hard-drive-block,1186.html
3) Format/mount the ram like any other file system.

*****

This is where things start to really get interesting.
--Basically, for linux (unix), allows one to exceed the maximum
physical limitations of available ram slots for a mother board!
--Can be used in conjunction with all options presented
--Battery backup power available on the physical ram board
--When used with option #6 allows for software "raid"ed ram
  && have a "ram" server farm using LVM methods
--With specific hardware options, can be used as hardware
  "raid"ed ram && use a "ram" server farm using LVM methods.
--Can be "wireless"
  e.g. raid farm connected via wifi
--Make that eeePC with 1MB RAM able to do video with ease.
  Extend the android/ipods memory w/o opening case!
  (with access to filesystem)
--In theory, should be able to "memory" transfers between
  computers (on or off network)

--Trade-offs:
  a) Memory used below rated ram speed
  b) Bus usage contention (e.g. pci bus also has other
  c) Bus speed (think usb 3.0 on a usb 1.0 connector)
  d) Expense dependent upon phyiscial hardware layout.
     e.g. gradual purchase of DDR vs. must purchase all DDR to work

###############################################
Option #4:

1) > sudo init 0
2) Install removeable hard drive interface
3) "Ram" the disk into removeable hard drive interface (before or after boot)
4) After boot, format/mount disk with suitable command

*****

--Allows one to have the exact same software options/setup on the drive
  from computer to computer.

--Trade-offs:
  a) Loose it && the ram is gone!
  b) Drop it && the ram may be gone!
  c) Long distance sneaker-net is slow
  d) Requires same removeable hard drive interface on all computers
     to be used.
  e) Doesn't do anything for speeding up RAM expansion options,
     other than providing more physical space for traditional swap.

###############################################
Option #5:

Actual stock PC ram disk setup:
http://www.vanemery.com/Linux/Ramdisk/ramdisk.html
Using a RAM disk :
http://www.linuxfocus.org/English/November1999/article124.html

*****

--Quick speed up option
--Relatively ease set-up

--Trade-offs:
   a) Limits overall available physical memory for other
      things (unless used with option 3)
   b) Potential for swap contention/thrashing 

###############################################
Option #6: (non-optional for kernels prior to 2.4)

Use Rapiddisk (or other ramdisk/cache links) :
http://rapiddisk.org/index.php?title=Main_Page (or other related ramdisk links)
This permits swappable ramdisks/caching, unlike standard RAM mounted systems.
Other "links" listed on the above page pertain to RamCloud /
CompCache / dm-cache / Bcache / flashcache
Compcache http://code.google.com/p/compcache/ is an in memory swap
disk (compressed)
Temp disk space would be another good canidate usage for a ram disk.

*****

--Software support for some of the hardware in Option 3.
--May be less expensive than an all hardware option.
--May be more flexible than all hardware option.

--Trade-offs:
  a) May be slower than all hardware options
  b) Non-RT kernel may create issues

###############################################
Option #7:
Reboot using CD/DVD w/ live distro

*****

-- RAM only / no other commands needed!
-- Best used in conjunction with option 3
-- With option 3, don't need a "live" CD/DVD,
   can load/run the entire HD in memory!
   See grub 2.0 (or other relevant boot loader)

--Trade-offs:
  a) No option 3 or UPS, means it's gone on power down/outtage!
  b) No option 3 means speed && what can be done is dependent
     upon available free RAM
     e.g. No standard X-server in 4 MB of RAM only

###############################################


More information about the SATLUG mailing list