You are not logged in.

#1 2012-08-24 12:00:02

kvanberendonck
Member
Registered: 2012-08-17
Posts: 45

Ramdisk RAID (Veterans Required)

So I'm using a very power intensive Toshiba L750D that idles up around 20W (Quad Core, 2x Discrete Cards, 8GB RAM etc) and I don't have a spot of money on me lately (nor do I want) to buy another laptop for use in a Uni Lecture Hall/Classroom Use. I've done a bit of hacking to bring my total system usage down to 12-13W but ideally for the battery life I need to make it through 4 sessions in a day I require ~11-12W (9 would be amazing, but that's dreaming when the InsydeH2O devil BIOS is involved).

One thing I noticed is that any disk activity shunts my laptop up to about 16.5W for the next few minutes. This is bad. Horridly bad infact, and I noticed that it wasn't just me reading from the hard drive but I theorize it also occurs when the system writes anything to the logs and gets the drives spinning. Today (with some IRC input) I had an idea that I could mount my entire archie partition (4gb) in a ramdisk and keep large files on a separate partition, then use some kind of RAID setup to synchronize the two disks every ~5 minutes so that I can have atleast ~4:30 minutes of disk idle time. This way, any system related writing (including writing to configs for the apps I use, and stuff like that) won't wake my hard drives at all.

One other thing to note is that my hard drives are very noisy (like jet engines!) and I don't want to disturb people around me by having them spinning for long periods of time.

I'm looking on veteran input on whether (a) This is a good idea and (b) exactly how hard it is (or some hints, steps) onto mounting my sda into the ramdisk at startup and having the ramdisk resume the position of the original sda while my actual physical drive sda acts as a delayed burst-write.

Help appreciated!

(Also, if anyone knows how to deal with devil-BIOS issues on the L750D and Fn keys/power saving issues, do post! I thought maybe swapping to UEFI might fix some of the more delicate power management issues I'm having with certain MB devices not being able to be toggled nor controlled properly).

Offline

#2 2012-08-24 12:53:28

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 488

Re: Ramdisk RAID (Veterans Required)

If you use ext3/4, you can just remount your filesystem with commit=600 option. I think it's exactly what you want - every write requests are kept in RAM for 600 seconds and then written at once. You can tweak this behaviour in /proc/sys/vm/dirty_ratio, /proc/sys/vm/dirty_background_ratio, /proc/sys/vm/dirty_expire_centisecs and /proc/sys/vm/dirty_writeback_centisecs.
For noise tweaking, look at hdparm -M (your hard drive might not support this - mine does not).
You might consider using powerdown script for automation. Here is my modified version.

Offline

#3 2012-08-24 12:59:19

kvanberendonck
Member
Registered: 2012-08-17
Posts: 45

Re: Ramdisk RAID (Veterans Required)

lahwaacz wrote:

If you use ext3/4, you can just remount your filesystem with commit=600 option. I think it's exactly what you want - every write requests are kept in RAM for 600 seconds and then written at once. You can tweak this behaviour in /proc/sys/vm/dirty_ratio, /proc/sys/vm/dirty_background_ratio, /proc/sys/vm/dirty_expire_centisecs and /proc/sys/vm/dirty_writeback_centisecs.
For noise tweaking, look at hdparm -M (your hard drive might not support this - mine does not).
You might consider using powerdown script for automation. Here is my modified version.

Thanks!

The powerdown script is excellent! I think I might even be able to save a couple watts!

I heard that using hdparm was bad for your hard drive with intensive writes. Won't writes be intensive if they are stored in RAM and batch-run?

Offline

#4 2012-08-24 13:15:00

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 488

Re: Ramdisk RAID (Veterans Required)

kvanberendonck wrote:
lahwaacz wrote:

If you use ext3/4, you can just remount your filesystem with commit=600 option. I think it's exactly what you want - every write requests are kept in RAM for 600 seconds and then written at once. You can tweak this behaviour in /proc/sys/vm/dirty_ratio, /proc/sys/vm/dirty_background_ratio, /proc/sys/vm/dirty_expire_centisecs and /proc/sys/vm/dirty_writeback_centisecs.
For noise tweaking, look at hdparm -M (your hard drive might not support this - mine does not).
You might consider using powerdown script for automation. Here is my modified version.

Thanks!

The powerdown script is excellent! I think I might even be able to save a couple watts!

I heard that using hdparm was bad for your hard drive with intensive writes. Won't writes be intensive if they are stored in RAM and batch-run?

Haven't heard of that. It's true that forcing the hard drive to spin up and down frequently is bad, but considering the 600 sec interval it should be OK...

Offline

#5 2012-08-24 13:50:56

masteryod
Member
Registered: 2010-05-19
Posts: 433

Re: Ramdisk RAID (Veterans Required)

OK, suggestion from my part:

CPU:
- what exactly is this CPU?
- what governor? Did you consider keeping it at minimum instead of ondemand?
- underclocking/undervolting? Is you BIOS capable to do it?
- blocking HT (if you got it) or 1 maybe 2 cores ? Is you BIOS capable to do it?

GPU:
- what are those graphics cards and what drivers you use?

HDD:
- did you consider SSD replacement? It will save you couple Watts, noise and heat.

LCD:
- of course you know that LCD in brighter mode eat more power?

Offline

#6 2012-08-25 10:03:29

kvanberendonck
Member
Registered: 2012-08-17
Posts: 45

Re: Ramdisk RAID (Veterans Required)

Okay, I tried setting commit and also the appropriate flags; I can still hear my hard drive spinning but afaik slowly (but still extremely noisy, I think it just has bad construction). If I want to turn it off completely, how might I do that?

Last edited by kvanberendonck (2012-08-25 10:03:48)

Offline

#7 2012-08-25 10:10:03

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 488

Re: Ramdisk RAID (Veterans Required)

kvanberendonck wrote:

Okay, I tried setting commit and also the appropriate flags; I can still hear my hard drive spinning but afaik slowly (but still extremely noisy, I think it just has bad construction). If I want to turn it off completely, how might I do that?

Using hdparm:

hdparm -y /dev/sda

or

hdparm -Y /dev/sda

Note that this is useless if some application tries to read from the disk... You can set the spindown timeout using

hdparm -S <value> /dev/sda

Read hdparm(8) for details.

Offline

#8 2012-08-25 11:11:26

kvanberendonck
Member
Registered: 2012-08-17
Posts: 45

Re: Ramdisk RAID (Veterans Required)

lahwaacz wrote:
kvanberendonck wrote:

Okay, I tried setting commit and also the appropriate flags; I can still hear my hard drive spinning but afaik slowly (but still extremely noisy, I think it just has bad construction). If I want to turn it off completely, how might I do that?

Using hdparm:

hdparm -y /dev/sda

or

hdparm -Y /dev/sda

Note that this is useless if some application tries to read from the disk... You can set the spindown timeout using

hdparm -S <value> /dev/sda

Read hdparm(8) for details.

I could fix the read issue using a ramdisk, correct?

Does anyone recommend getting an SSD. I'm considering spending the money but $150 is alot for me right now... is it silent? And do you think I could save 1-2W?

Offline

#9 2012-08-25 15:00:52

masteryod
Member
Registered: 2010-05-19
Posts: 433

Re: Ramdisk RAID (Veterans Required)

kvanberendonck wrote:

Does anyone recommend getting an SSD. I'm considering spending the money but $150 is alot for me right now... is it silent? And do you think I could save 1-2W?

Damn... last time I checked it was bigger difference (notebooks), right now it can be even other way around ("big" and fast SSD can eat more power than slow HDD). So it all depends on SSD model & capacity and your HDD competition.

Last edited by masteryod (2012-08-25 15:03:56)

Offline

Board footer

Powered by FluxBB