Page 10 of 49 FirstFirst ... 8910111220 ... LastLast
Results 91 to 100 of 482

Thread: Making Ubuntu Fast using RAM (updated and simplified)

  1. #91
    Join Date
    May 2012
    Beans
    10

    Re: Making Ubuntu Fast using RAM (updated and simplified)

    Hey, great idea with the script, I'm running into a a problem when trying to install it though (lucid)


    Would you like a cron job to be added to run the update script at midnight
    every day in the RAM Session? In order to take advantage of these updates,
    you would need to reboot after an update has been performed. [Y/n]

    Your choice: n

    You chose no.

    Installing essential packages:
    Running apt-get update...
    Installing squashfs-tools...
    Installing live-initramfs...
    live-initramfs was not found in the repo. Attempting to download .deb
    Installing dependencies for live-initramfs: busybox, user-setup...
    Downloading and installing live-initramfs .deb...
    live-initramfs failed to install. You'll have to download and install it
    manually... Try: https://launchpad.net/ubuntu/maveric...live-initramfs


    sudo apt-get install live-initramfs gives me:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Suggested packages:
    loop-aes-utils curlftpfs genext2fs httpfs2 mtd-tools
    The following NEW packages will be installed:
    live-initramfs
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0B/99.4kB of archives.
    After this operation, 500kB of additional disk space will be used.
    Unpacking live-initramfs (from .../live-initramfs_1.173.1-1_all.deb) ...
    dpkg: error processing /var/cache/apt/archives/live-initramfs_1.173.1-1_all.deb (--unpack):
    trying to overwrite '/usr/share/initramfs-tools/conf.d/compcache', which is also in package casper 0:1.236.3
    update-initramfs: deferring update (trigger activated)
    Processing triggers for initramfs-tools ...
    update-initramfs: Generating /boot/initrd.img-3.2.0-19-generic
    Processing triggers for ureadahead ...
    Errors were encountered while processing:
    /var/cache/apt/archives/live-initramfs_1.173.1-1_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    When trying to manually install it via the .dep from the internet page I get:
    (Reading database ... 90803 files and directories currently installed.)
    Unpacking live-initramfs (from .../live-initramfs_1.173.1-1_all.deb) ...
    dpkg: error processing /home/asdfa/live-initramfs_1.173.1-1_all.deb (--install)
    :
    trying to overwrite '/usr/share/initramfs-tools/conf.d/compcache', which is also in package casper 0:1.236.3
    update-initramfs: deferring update (trigger activated)
    Processing triggers for initramfs-tools ...
    update-initramfs: Generating /boot/initrd.img-3.2.0-19-generic
    Processing triggers for ureadahead ...
    Errors were encountered while processing:
    /home/asdfa/live-initramfs_1.173.1-1_all.deb

    Can you think of a way to fix this?

  2. #92
    Join Date
    May 2008
    Location
    Edmonton, Canada
    Beans
    Hidden!

    Re: Making Ubuntu Fast using RAM (updated and simplified)

    Quote Originally Posted by gumbomumbo View Post
    Can you think of a way to fix this?
    I'll install lucid in a VM later tonight and see if I can reproduce the error.

  3. #93
    Join Date
    May 2008
    Location
    Edmonton, Canada
    Beans
    Hidden!

    Re: Making Ubuntu Fast using RAM (updated and simplified)

    Quote Originally Posted by gumbomumbo View Post
    Can you think of a way to fix this?
    Tried it using ubuntu-10.04.4-desktop-amd64.iso. My steps:

    1. Installed the OS
    2. Ran the script

    I touched nothing else - not settings, not repos, not anything. As you can see, the repos had no problems installing the package. Are you using x86 or amd64?

    Your errors also mention ureadahead. I'm not sure if this will help (especially since I can't reproduce the error) but try uninstalling it, and any other software you may have installed that deals with copying stuff to RAM at boot (other than what linux naturally does).
    Attached Images Attached Images

  4. #94
    Join Date
    May 2012
    Beans
    10

    Re: Making Ubuntu Fast using RAM (updated and simplified)

    I have an x86. I'll try getting rid of ureadahead, thanks for the try

  5. #95
    Join Date
    Jun 2012
    Beans
    4

    Re: Making Ubuntu Fast using RAM (updated and simplified)

    Hi everybody,

    nice script, indeed, my thanks to the author!

    I'm looking for some distro to build my home NAS.
    The key point I am after is to be able to put [all] my hdd down to stand by mode while nobody use them (like during the night etc).
    I have found however that "normal" ubuntu wakes up at least "/" hdd (to write logs? and do other stuff) regularly as well as another hdds.
    It is not what I wanted so I thought this script could do the trick - load whole system in memory so everything would work without accessing HDD.

    (I do know there are some distro available that were initially modified to do that trick, but I also need couple of programs to be installed and I could not figure out how to do that for those distros).

    Sorry for being long, just a question for author:

    can I do something to save RAM OS back to disk for the next boot?
    in other words, can I save state of the RAM OS to survive rebooting?

    Like a script that being launched before shutting down would save/copy RAM back to Original OS?

    It is how SLAX works by the way. When you tape "poweroff" it calls some script that saves everything that have been changed back to disk so next time when you boot your OS you have everything restored AND everything works from RAM as well.

    Any advice would be much appreciated.
    Thanks.

  6. #96
    Join Date
    May 2008
    Location
    Edmonton, Canada
    Beans
    Hidden!

    Re: Making Ubuntu Fast using RAM (updated and simplified)

    Quote Originally Posted by zsasha2 View Post
    Hi everybody,

    nice script, indeed, my thanks to the author!

    I'm looking for some distro to build my home NAS.
    The key point I am after is to be able to put [all] my hdd down to stand by mode while nobody use them (like during the night etc).
    I have found however that "normal" ubuntu wakes up at least "/" hdd (to write logs? and do other stuff) regularly as well as another hdds.
    It is not what I wanted so I thought this script could do the trick - load whole system in memory so everything would work without accessing HDD.

    (I do know there are some distro available that were initially modified to do that trick, but I also need couple of programs to be installed and I could not figure out how to do that for those distros).

    Sorry for being long, just a question for author:

    can I do something to save RAM OS back to disk for the next boot?
    in other words, can I save state of the RAM OS to survive rebooting?

    Like a script that being launched before shutting down would save/copy RAM back to Original OS?

    It is how SLAX works by the way. When you tape "poweroff" it calls some script that saves everything that have been changed back to disk so next time when you boot your OS you have everything restored AND everything works from RAM as well.

    Any advice would be much appreciated.
    Thanks.
    Yes, this is what the script is designed to do - save any software you installed and any files you saved back to the HDD. This is not done when you reboot. It only does this when you tell it to. You can however easily alias the reboot or poweroff commands to save everything before actually rebooting or powering off.

    On the one hand, this script, if used correctly, would actually be very useful in a NAS situation since all you would need is to configure it once to mount the HDDs, use NFS/SMB shares, and configure the users, and it would rarely need to be reconfigured again (as a home NAS anyway). On the other hand, the speed benefits of the OS copying itself to RAM on boot for a NAS become far less relevant than on a desktop.

    As for your specific situation, I'm not sure how well this script would work for you. In theory, it should never write to the HDD during normal operations, but you may be better off using a distro specifically designed for running on a NAS, such as freeNAS, or, if you have the money, something like the QNAP lineup of products that comes with it's own custom version of linux as it's firmware. I'm pretty sure that both have an option to let the HDDs fall asleep if they are not being used, and freeNAS has the option to copy itself to ram as well (if I'm not mistaken).

  7. #97
    Join Date
    Jun 2012
    Beans
    4

    Re: Making Ubuntu Fast using RAM (updated and simplified)

    Quote Originally Posted by terminator14 View Post
    Yes, this is what the script is designed to do - save any software you installed and any files you saved back to the HDD. This is not done when you reboot. It only does this when you tell it to. You can however easily alias the reboot or poweroff commands to save everything before actually rebooting or powering off.
    Oh, that's good.
    Could you give me an example? What the name of the script and its cmd parameters?
    I mean the script that saves RAM back to HDD?
    Where does it save its state? File or partition or something else? I think I would not want to save everything back to flash, because it could cause flash degradation so HDD would be an ideal in my case.

    Do you have any manual somewhere?

    Quote Originally Posted by terminator14 View Post
    On the one hand, this script, if used correctly, would actually be very useful in a NAS situation since all you would need is to configure it once to mount the HDDs, use NFS/SMB shares, and configure the users, and it would rarely need to be reconfigured again (as a home NAS anyway). On the other hand, the speed benefits of the OS copying itself to RAM on boot for a NAS become far less relevant than on a desktop.
    The main benefit for me is not speed but to let HDD sleep while no one access them.
    I think unRAID does pretty much what I want but it is quite expensive (price of a new big HDD!) and can't easily be customized.

    Quote Originally Posted by terminator14 View Post
    As for your specific situation, I'm not sure how well this script would work for you. In theory, it should never write to the HDD during normal operations, but you may be better off using a distro specifically designed for running on a NAS, such as freeNAS, or, if you have the money, something like the QNAP lineup of products that comes with it's own custom version of linux as it's firmware. I'm pretty sure that both have an option to let the HDDs fall asleep if they are not being used, and freeNAS has the option to copy itself to ram as well (if I'm not mistaken).
    The whole idea was to boot everything into RAM and that's it.
    Also FreeNAS, being excellent NAS-OS, has some weak points in my opinion - it basically uses Raid5-like approach so it wakes up all disks just to read some small file.
    Also the latest version requires 6 GIG of RAM - it is ridiculous!

    I want to use "Greyhole" to do disk pooling and "SnapRAID" to do parity calculation. But all data remains intact so if the system crashes everything (apart from crashed disk of course) could be easily recovered by just plugging the disks into another system and remounting them so no hassle with Raid5 or anything like that.

  8. #98
    Join Date
    Mar 2007
    Location
    ho chi minh city
    Beans
    225
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Making Ubuntu Fast using RAM (updated and simplified)

    Thank you a lot terminator14,

    I've beeng searching for a how-to for quite sometime now. I'm over the moon I've come across this wonderful script. I'm running the script now and hope it'll work fine.
    Thank you.
    Nvidia 525M and bumblebee 3.x

  9. #99
    Join Date
    Mar 2007
    Location
    ho chi minh city
    Beans
    225
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Making Ubuntu Fast using RAM (updated and simplified)

    Everything is fine except that the grub entry created by your script will not work.
    These are the lines my machine displayed:
    error: no such device: ubuntu
    error: no such device: ubuntu
    error: no such disk
    error: you need to load the kernel first
    You hit 'enter' and turn back to the grub menu.

    I had to add my own grub entry as follows

    I opened:
    /etc/grub.d/40_custom
    and added:

    menuentry 'Ubuntu to Ram' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 33624d05-2f07-4f4d-b7f4-729f6691e7c9
    linux /boot/vmlinuz-3.2.0-25-generic root=UUID=33624d05-2f07-4f4d-b7f4-729f6691e7c9 boot=live toram=filesystem.squashfs username=myusername noautologin quickreboot apparmor=0 security="" ro quiet
    initrd /boot/initrd.img-3.2.0-25-generic
    }
    Now I am typing on ubuntu to RAM.

    So, please update your script for the grub entry for ubuntu 12.04

    P.S I'm running ubuntu precise x64 on Dell R N5110, nvidia 525M.

    Thank you.
    Last edited by tenmoi; June 26th, 2012 at 06:56 AM.
    Nvidia 525M and bumblebee 3.x

  10. #100
    Join Date
    May 2008
    Location
    Edmonton, Canada
    Beans
    Hidden!

    Re: Making Ubuntu Fast using RAM (updated and simplified)

    Quote Originally Posted by zsasha2 View Post
    I think I would not want to save everything back to flash, because it could cause flash degradation so HDD would be an ideal in my case.
    According to http://www.allmemorycards.com/glossary/reliability.htm,

    Quote Originally Posted by http://www.allmemorycards.com/glossary/reliability.htm
    A Multi-Level Cell memory card has in general at least 10 000 write and erase cycles.
    which is the low end. SLC has 10 times that many.

    Quote Originally Posted by http://www.allmemorycards.com/glossary/reliability.htm
    10 000 write and erase cycles can also be translated to that you can write and erase the entire content of the memory card once per day for 27 years.
    Seeing as you will only be writing to the flash drive when you are shutting down, if you were to shut down the NAS 10 times per day, everyday, you might be in trouble in 3 years. For reference, I reboot either one of my 2 NAS's roughly once every 2-3 months. Even if, after 3 years, you begin to experience problems with your flash drive's reliability, I doubt you'll have a problem acquiring a new one that, by then, will be 10x the capacity, 10x the speed, and worth $20. I've been running freeNAS with 6x2TB drives off a USB drive for over a year without any problems.

    Quote Originally Posted by zsasha2 View Post
    Do you have any manual somewhere?
    The manual is:

    1. The first post on the first page of this thread. In order to download the script you literally have to scroll past this.
    2. The script itself, as it explains every step of what it's doing
    3. The heavily commented source code
    4. My previous thread outlining the steps the script uses that the first post of this thread links to
    5. The original capink's thread that the above thread links to

    I have spent a considerable amount of time writing these (excluding capink's thread of course). If you aren't sure about how the script works - please start by reading them, or at the very least, #1, which answers your question.

    Quote Originally Posted by zsasha2 View Post
    Also the latest version requires 6 GIG of RAM - it is ridiculous!
    I believe you are referring to this information here:

    Quote Originally Posted by http://doc.freenas.org/index.php/Hardware_Recommendations
    The best way to get the most out of your FreeNAS™ system is to install as much RAM as possible. If your RAM is limited, consider using UFS until you can afford better hardware. ZFS typically requires a minimum of 6 GB of RAM in order to provide good performance; in practical terms (what you can actually install), this means that the minimum is really 8 GB.
    which clearly states that this is a filesystem requirement, and has nothing to do with the freeNAS OS itself. It also says that freeNAS offers an alternative filesystem if you don't have the RAM needed for ZFS.

    Quote Originally Posted by zsasha2 View Post
    I want to use "Greyhole" to do disk pooling and "SnapRAID" to do parity calculation. But all data remains intact so if the system crashes everything (apart from crashed disk of course) could be easily recovered by just plugging the disks into another system and remounting them so no hassle with Raid5 or anything like that.
    Not sure if freeNAS supports this, but if this is any important feature, I doubt they would leave it out. Do a search and I'm sure you'll find freeNAS is either capable of this, or has an alternative that works just as well.
    Last edited by terminator14; June 26th, 2012 at 10:06 AM.

Page 10 of 49 FirstFirst ... 8910111220 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •