You are not logged in.

#1 2015-05-28 16:49:47

Fred7109
Member
Registered: 2015-05-17
Posts: 134

[Solved]RAMDisk - Creating and using

Hi

I am new to linux and is from Windows a daily user of RAMDisks. Therefore I have some question regarding RAMDisks.

Is it possible to create a RAMDisk which automount on startup and contains the data which is on a VHD. So that you have a RAMDisk which is the same size as a VHD, and the VHD is on the RAMDisk. I would like this so I could run programs and files from the VHD mounted on the RAMDisk.

But this lead to my second question, is it possible to store ALL files from a Linux program in a folder mounted on a RAMDisk(Because in Windows you chose where programs are installed)?

Because I am a student and have my books as .pdf, therefore it would be nice to have .pdf program and the .pdfs on a RAMDisk - so they could be loaded really fast.

Regards
Frederik

Last edited by Fred7109 (2015-05-28 18:20:53)

Offline

#2 2015-05-28 17:17:19

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved]RAMDisk - Creating and using

Take a look at anything-sync-daemon, it should do what you want.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2015-05-28 17:23:46

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [Solved]RAMDisk - Creating and using

Thankyou, but is it possible to install a program to a specfic folder for this purpose?

Offline

#4 2015-05-28 17:25:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved]RAMDisk - Creating and using

What is the motivation behind all this? I'm using llpp and loading pdfs is super-fast.
Maybe using an SSD would be a better idea?

Offline

#5 2015-05-28 17:30:21

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [Solved]RAMDisk - Creating and using

I simply like the speed when scrolling through pdfs. I already have in mind investing in a SSD, but an SSD is not as fast as an RAMDisk - and I have plenty of RAM.

But do you know if it is possible ot install the program which is running the pdfs on a RAMDisk?

Offline

#6 2015-05-28 18:18:42

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved]RAMDisk - Creating and using

If you have plenty of RAM then there's no need to install your PDF reader in a non-standard location as it will only be loaded from disk the first time you use it anyway.

The rest of the time it will be loaded from the copy already cached in memory.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2015-05-28 18:20:26

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [Solved]RAMDisk - Creating and using

Thankyou slithery, i did not know that.

Offline

#8 2015-05-28 21:33:08

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved]RAMDisk - Creating and using

How did you measure the speed difference between different setups?

Offline

#9 2015-05-28 21:40:14

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [Solved]RAMDisk - Creating and using

When it comes to pdfs it is qualitatively assessed. I take a very huge .pdf file, and look how fast it is to render pages etc.

Offline

#10 2015-05-28 21:43:16

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Offline

#11 2015-05-28 21:47:21

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [Solved]RAMDisk - Creating and using

Definitely interesting, thankyou Head_on_a_Stick

Offline

#12 2015-05-28 21:56:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved]RAMDisk - Creating and using

That will run the whole system in RAM. While it makes sense for mini distros like slitaz, I'm not sure if doing the same with a standard distribution like Arch is the correct approach.

Fred7109 wrote:

When it comes to pdfs it is qualitatively assessed. I take a very huge .pdf file, and look how fast it is to render pages etc.

And? I can't read a paragraph in the time it takes for the application to render the whole page (or two, if I've set it up this way). Can you share a pdf that's too slow for you when read from the HDD?

It's your system, but I think you're making it complex for superficial gain.

Offline

#13 2015-05-28 23:35:27

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: [Solved]RAMDisk - Creating and using

karol wrote:

And? I can't read a paragraph in the time it takes for the application to render the whole page (or two, if I've set it up this way). Can you share a pdf that's too slow for you when read from the HDD?

It's your system, but I think you're making it complex for superficial gain.

You haven't ever been curious? Wanted to try something and learn if it could be done? Where you ever curious about something, tore it apart and later realized that you can't put it back together? It think it would be 'kewl' if I could load my entire OS into ram.

BTW, Fred? It will take time to copy all of your PDF's to RAM every time you reboot.
First, you need to create a directory:

$ mkdir ~/pdf

Open your fstab and add something like this:

tmpfs   /home/user/pdf         tmpfs   nodev,nosuid,size=2G          0  0

And then write a startup script (make sure to make it executable)

#!bin/bash
cp /path/to/pdf's/on/drive/*.pdf /home/user/pdf/

and look to your DM to figure out how to autostart the script.

Offline

#14 2015-05-29 07:48:51

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [Solved]RAMDisk - Creating and using

Yeah, I am curios and will also try to load the OS in RAM. But I also need to be realistic, because at my current skill level, then it would be 'too much'. And I found out that it is not worth to make a RAMDisk to store the pdfs, because of curiosity.
Thankyou for the help.

Offline

#15 2015-05-29 09:35:08

LithiumPT
Member
Registered: 2013-02-25
Posts: 15

Re: [Solved]RAMDisk - Creating and using

A fast and simple way is to copy the pdf (or any other frequently used file) to /tmp , as /tmp is a "ramdisk" (tmpfs) by default on arch installs.

Offline

#16 2015-05-29 10:33:19

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [Solved]RAMDisk - Creating and using

Thankyou LIthiumPT, I did not know that

Offline

#17 2015-05-29 10:33:37

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: [Solved]RAMDisk - Creating and using

LithiumPT wrote:

A fast and simple way is to copy the pdf (or any other frequently used file) to /tmp , as /tmp is a "ramdisk" (tmpfs) by default on arch installs.

But /tmp will only use half the ram available unless you specifically tell it a different size to use. So, to use my system as an example, you had 16GB RAM, /tmp would use 8GB. And if I had 9GB of pdf's to load, then I would get a copy or out of space error. That's where the size variable comes in.

Offline

#18 2015-05-29 10:38:29

Fred7109
Member
Registered: 2015-05-17
Posts: 134

Re: [Solved]RAMDisk - Creating and using

That is good to know, thankyou Buddlespit

Offline

Board footer

Powered by FluxBB