LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-01-2011, 12:22 PM   #1
hcgrant
Member
 
Registered: Feb 2004
Location: UK Hertfordshire
Distribution: Opensuse 12.2 plus Macs and a Vista and two little RaspberryPi
Posts: 45

Rep: Reputation: 15
Can a Ramdrive be used to speed up performance?


I have recently upgraded to a M4A77TD motherboard and 8Gig of memory. I have a AMD Athlon(tm) II X4 645 Processor, and I cant say that I see much improvement over the one that died. I have noticed that the HDD light is constantly flashing so I wondered if I couldnt use some of the Ram to create a ramdrive to speed things up . So ..my question ... what should I put on my ramdrive?
My own thoughts were the var and usr directories. I would load the ramdrive at startup (which would slow down my startup) And Rsync back again on shutdown.
Any suggestions tips etc? Has anyone done this? Ive had a look through the forum but cant see anything ..but my search terms may not be all that good.

suse linux 11.1 64 bit
var=0.3G usr=5M lib=0.2G opt=0.6G sys=0.6G
As far as I can see swop is never used

Last edited by hcgrant; 02-01-2011 at 12:28 PM. Reason: addition
 
Old 02-01-2011, 12:50 PM   #2
silvyus_06
Member
 
Registered: Oct 2010
Distribution: Ubuntu 10.04 , Linux Mint Debian Edition , Microsoft Windows 7
Posts: 390

Rep: Reputation: 50
if you pass most of your time on linux and can accept longer boot times you might want to load all the os in ram... i'm just saying..and to not lose what you have in your ram just standby the computer ...........

the linux os usually takes less than 8gb space

edit: this

Last edited by silvyus_06; 02-01-2011 at 12:52 PM.
 
Old 02-01-2011, 12:57 PM   #3
hcgrant
Member
 
Registered: Feb 2004
Location: UK Hertfordshire
Distribution: Opensuse 12.2 plus Macs and a Vista and two little RaspberryPi
Posts: 45

Original Poster
Rep: Reputation: 15
Thanks silvyus_06 From my figures above the OS would fit into 2G. Would ramdrives be saved on going into standby? I guess I should try and see ;-))
I use Linux 99% of the time. I do have WinXP, but its rarely used ..to to backup my blackberry.

Last edited by hcgrant; 02-01-2011 at 01:00 PM. Reason: Additon and corrections
 
Old 02-01-2011, 01:02 PM   #4
silvyus_06
Member
 
Registered: Oct 2010
Distribution: Ubuntu 10.04 , Linux Mint Debian Edition , Microsoft Windows 7
Posts: 390

Rep: Reputation: 50
well i thought that all standby did was suspend everything except ram , to keep it alive. you would perhaps like a squashfs that is a bit harder to do for faster copying times
 
Old 02-01-2011, 03:39 PM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
Originally Posted by hcgrant View Post
I have noticed that the HDD light is constantly flashing
During what activity (web browsing, or editing documents or whatever)?

I've often wondered myself about Linux hard drive accesses when I think nothing ought to be happening. Usually, but not always, I'm in a web browser when I see such activity. I don't understand it. I'm a bit uncomfortable about it. But I haven't seen evidence that it is causing a performance problem.

Quote:
so I wondered if I couldnt use some of the Ram to create a ramdrive to speed things up .
I think not. Linux file caching almost always works better than a ramdrive. On a system with excess ram, the first time you read anything from the HDD, it goes into the cache and on all subsequent times it is resolved from cache rather than HDD.

Copying all that from HDD to ramdisk on startup just moves the cost of those first reads, it doesn't eliminate them. For most of us (who want to use our computer quickly after turning it on) it would move the cost to somewhere worse. If you leave you computer on most of the time, then it moves the cost in a way that makes less difference (once per boot bunched together vs. once per boot spread out) but still there is no net benefit vs. just letting the cache do it.

I would make sure the /tmp directory is in a tmpfs rather than a disk partition, because files that are created, then used, then quickly deleted (or at least not used again much later) are much less total work in a tmpfs than on disk.

But for directories where you will mostly be reading programs or data from the HDD, it is best to just let the cache grab them on first access rather than using a ramdisk.

Last edited by johnsfine; 02-01-2011 at 03:42 PM.
 
1 members found this post helpful.
Old 02-01-2011, 05:04 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,563

Rep: Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779Reputation: 2779
I used to use ramdrive in windows to cheat programs. The same would be true today with linux. Linux still has easy ways to create a ramdrive.

I used to boot up system and then copy the main program to the ramdisk. All user knowledge of the app was from icons or links to the program on the ramdrive.

If you wanted, you would easily install some or more apps to a ramdrive. If most of the disk access was to the files on the ramdrive you would notice a huge gain in user speeds. Problem with linux is you may have to be watchful as a normal install has files all over the place.
 
1 members found this post helpful.
Old 02-02-2011, 09:14 AM   #7
hcgrant
Member
 
Registered: Feb 2004
Location: UK Hertfordshire
Distribution: Opensuse 12.2 plus Macs and a Vista and two little RaspberryPi
Posts: 45

Original Poster
Rep: Reputation: 15
Thanks Johnsfine ...Ill setup a tmp dir on a tempfs filesytem and see what happens
I do have Firefox open most of the time.
Ill post here if I notice an improvement.

Hmmmm I just did this ..[mount -t tmpfs none /tmp] and found i couldnt launch apps! (from the KDE Desktop) I guess the ramdrive needs to be set at startup ...Ill have a go at that later
HCG

Last edited by hcgrant; 02-02-2011 at 09:33 AM. Reason: addition
 
Old 02-02-2011, 09:42 AM   #8
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
I'm not an expert on setting up /tmp, so I'm not certain. But I always acted on the belief that you need to have a line in /etc/fstab to establish /tmp as a tmpfs correctly. Then it will be correct on next reboot.
 
Old 02-02-2011, 09:49 AM   #9
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Quote:
Originally Posted by johnsfine View Post
I've often wondered myself about Linux hard drive accesses when I think nothing ought to be happening. Usually, but not always, I'm in a web browser when I see such activity. I don't understand it. I'm a bit uncomfortable about it. But I haven't seen evidence that it is causing a performance problem.
There are many reasons a web browser would store stuff to the hard drive, such as history and cookies.
 
Old 02-05-2011, 06:51 AM   #10
hcgrant
Member
 
Registered: Feb 2004
Location: UK Hertfordshire
Distribution: Opensuse 12.2 plus Macs and a Vista and two little RaspberryPi
Posts: 45

Original Poster
Rep: Reputation: 15
Ive added a line in fstab to create a tmpfs file for /tmp and not noticed any difference in speed. The annoying buzzes of disk accesses continues. I shutdown eth0 and pulled out the network cable (belt and braces!) but still the disk access continue ..roughly every 4/5 seconds, so I dont think its the browser (Firefox)causing the activity. I would be interested to know whats causing this. Using gkrellm I can see that its its disk writes that are occurring. Perhaps I should raise this in a separate thread.
 
Old 02-05-2011, 10:52 AM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860Reputation: 4860
If you are using KDE it may be the indexing service.
 
Old 02-05-2011, 10:57 AM   #12
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
Originally Posted by TobiSGD View Post
If you are using KDE it may be the indexing service.
Do you have any good documentation URLs or search keywords to get the basic info to investigate and/or configure that (name of the process doing the work, etc.)? A quick google search for "KDE indexing service" gave a lot of basically useless content. Linux features can be very hard to search for if you don't know the right keyword or name. I use KDE and didn't even know it did indexing.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to speed up networking performance? uneedav8 Linux - Newbie 1 09-12-2007 04:46 AM
Slackware 10.1 Boot Speed Performance? m_rizvan_m Slackware 27 07-28-2005 06:55 PM
boot speed and performance questions wrat Debian 4 11-20-2004 01:02 PM
System performance, tweaking, and SPEED ethikiah Linux - General 3 09-29-2004 08:48 PM
Compiling speed increased by ramdrive? exodist Linux - Software 1 07-31-2004 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration