Upcoming how-to...RAMboot to a ramdisk for blazing speed!

Here you can discuss every aspect of Debian. Note: not for support requests!

Re: Upcoming how-to...RAMboot to a ramdisk for blazing speed

Postby Aubrey_Snoddie » 2013-03-17 16:54

Isaac,

thanks for the speedy reply.

In your original documentation you mention copying to a directory called /snapstrip/ and creating a snapstrip.tar etc., in the /usr/share/initramfs-tools/scripts/local script, you do a "mkdir /ijkijk". How do the /snapstrip/ and /ijkijk directories get concatenated / merged together e.g. /ijkijk/snapshot/. ??

Here is what I have on disk at the moment -

root@Carcassonne ~: ls /bootie/ -als
total 3442288
4 drwxr-xr-x 3 root root 4096 Mar 17 16:40 .
4 drwxr-xr-x 27 root root 4096 Mar 17 16:30 ..
16 drwx------ 2 root root 16384 Mar 16 16:34 lost+found
3442264 -rw-r--r-- 1 root root 3524874240 Mar 17 16:36 snapstrip.tar


Regards,


Aubrey
User avatar
Aubrey_Snoddie
 
Posts: 11
Joined: 2013-03-14 11:22
Location: EU

Re: Upcoming how-to...RAMboot to a ramdisk for blazing speed

Postby Aubrey_Snoddie » 2013-03-17 19:53

Done.

root@Carcassonne ~: free -g
total used free shared buffers cached
Mem: 15 5 9 0 0 4
-/+ buffers/cache: 0 14
Swap: 0 0 0
root@Carcassonne ~: df -ah
Filesystem Size Used Avail Use% Mounted on
rootfs 12G 4.8G 6.9G 41% /
sysfs 0 0 0 - /sys
proc 0 0 0 - /proc
udev 10M 0 10M 0% /dev
devpts 0 0 0 - /dev/pts
tmpfs 1.6G 708K 1.6G 1% /run
none 12G 4.8G 6.9G 41% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.1G 0 3.1G 0% /run/shm
tmpfs 14G 56K 14G 1% /tmp
tmpfs 7.8G 0 7.8G 0% /var/tmp
tmpfs 7.8G 352K 7.8G 1% /var/log
binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc
root@Carcassonne ~: mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=2012534,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=1617580k,mode=755)
none on / type tmpfs (rw,relatime,size=12131840k)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=3235140k)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,size=13749420k,mode=777)
tmpfs on /var/tmp type tmpfs (rw,noatime)
tmpfs on /var/log type tmpfs (rw,noatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
root@Carcassonne ~:

I tried to post a screenshot, but alas, the forum here had a problrm with that...

I will keep you posted on my progress.

Thank you all for your help.


Regards,


Aubrey
User avatar
Aubrey_Snoddie
 
Posts: 11
Joined: 2013-03-14 11:22
Location: EU

Re: Upcoming how-to...RAMboot to a ramdisk for blazing speed

Postby IsaacKuo » 2013-03-28 17:36

Oh, I forgot to reply to your last update!

In your situation you should eliminate everything in the snapstrip script involving removing files (anything with the rm command).

The snapstrip script is described in Step 4 of my how-to: viewtopic.php?f=16&t=29774

The reason the files are put into a big tarball is because the initial busybox environment has a limited version of cp. It just can't handle a massive recursive cp call of the size and scale of copying over an entire OS--even when stripped down. In contrast, the tar command is available in busybox and it can handle humongous archives.
Isaac Kuo
User avatar
IsaacKuo
 
Posts: 316
Joined: 2008-04-24 20:06

Re: Upcoming how-to...RAMboot to a ramdisk for blazing speed

Postby GlenWalker » 2013-04-18 21:35

Hello everyone!

I've been using Debian for years but only just registered on here...to join in this discussion!

For a few months now I've been mulling over creating a virtual machine (ever since I found out about VGA passthrough using Xen) so I can install Windows inside Debian and dust off some of my old games that refuse to work in WINE. Since RAM is relatively inexpensive at the moment (and I need to build a new computer capable of doing IOMMU for passthrough to work) I am hoping to get 16GB (or possibly even 32GB if I'm feeling greedy) and I thought it would be really cool if I could load the host operating system (dom0 in Xen) all into RAM so it would run at the fastest possible speed.

On top of the host I would have a Windows virtual machine and possibly a BSD/other Linux virtual machine to play around with. Since the virtual machines would have their own file system (on their own drives) it would get around the issue of persistence.

Curious to see what you all think about that? Would having the Xen dom0 running in RAM actually make a difference to the performance of the virtual machines? Obviously they'll still be reading from and writing to an SSD but the virtual side of things such as the network interface and USB/PCI cards all goes through the host OS doesn't it? Or am I confused...

(oh and Isaac I feel for you and your old hardware...I have a bunch of stuff hanging around (especially if I build a new PC!) so please PM me if you are in the UK and I'd be happy to send you some of it)
This is for work: http://www.technicalwriting.org.uk
And this is for fun: http://www.bluepenguin.me :--)
GlenWalker
 
Posts: 2
Joined: 2013-04-18 21:15
Location: UK

Re: Upcoming how-to...RAMboot to a ramdisk for blazing speed

Postby DebbyIan » 2013-05-09 14:25

Way to go.
What once seemed an academic exercise now seems quite a plausible avenue for the industry to pursue in the foreseeable future. I can readily see a serious use and benfits of a RAM disk for the entire OS by using it with a Solid State Disk/Storage.
DebbyIan
 
Posts: 123
Joined: 2013-05-09 12:12

Re: Upcoming how-to...RAMboot to a ramdisk for blazing speed

Postby IsaacKuo » 2013-05-10 10:21

GlenWalker wrote:Curious to see what you all think about that? Would having the Xen dom0 running in RAM actually make a difference to the performance of the virtual machines? Obviously they'll still be reading from and writing to an SSD but the virtual side of things such as the network interface and USB/PCI cards all goes through the host OS doesn't it? Or am I confused...


To be honest, it's new technology to me, since my computers are so weak. But with Debian 7's release including OpenStack and Xen Cloud Platform, I've got to try it out myself!

Well...at least the cloud computing aspects. I'm severely limited by the fact that my motherboards are limited to 2gigs of RAM. When I get a new job, I'm going to celebrate with a Motion Computing LE1700 SXGA slate, but even that will be limited to 4 gigs of RAM (two slots of DDR2 laptop memory; I actually have one 2gig stick already).
Isaac Kuo
User avatar
IsaacKuo
 
Posts: 316
Joined: 2008-04-24 20:06

Re: Upcoming how-to...RAMboot to a ramdisk for blazing speed

Postby GlenWalker » 2013-05-10 11:58

Seems to be new to everyone I've asked so I think my solution is to try it and see!

I have settled on what hardware I am going to use and just need to scratch together some funds for it.

For now though I have managed to get Windows 7 working inside OpenSUSE (it was already on the hard drive). They both run really slowly though and the motherboard I have doen't support the right kind of virtualisation for graphics/PCI passthrough so functionality is limited.

Going to try again with Debian instead of OpenSUSE and see if I can boost performance then I'll try the ramdisk...though like you I am limited to 4GB for now.

Once I've done some experimentation (and possibly raided the piggy bank for funds and acquired new hardware) I'll post back my findings.
This is for work: http://www.technicalwriting.org.uk
And this is for fun: http://www.bluepenguin.me :--)
GlenWalker
 
Posts: 2
Joined: 2013-04-18 21:15
Location: UK

Re: Upcoming how-to...RAMboot to a ramdisk for blazing speed

Postby IsaacKuo » 2016-09-20 19:27

I'm bumping this because I've just put together my latest and greatest version of RAMboot - this time for Debian 8 Jessie! Honestly, the exact same techniques still work even after all these years, and regardless of the switch to systemd.

But I've cleaned things up, and made better notes on how to maintain the system and what to expect from update-grub.

http://www.linuxquestions.org/questions ... sie-37165/

Enjoy!
Isaac Kuo
User avatar
IsaacKuo
 
Posts: 316
Joined: 2008-04-24 20:06

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable