Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This might not be answerable in theory, but any thoughts are appreciated:

I have a UNIX server that has 2GB of RAM, and presumably it is slightly overloaded and swapping to disk heavily. It is a test server, and the only user is me, so being busy is not a problem.

I have some extra RAM available (lets say 6GB) of RAM. Assuming the RAM upgrade substantially removes the need to page to disk, the question I have is:

Will the upgrade save energy (from a net reduction of disk usage vs. the energy used by the additional RAM)?

UPDATE: To clarify, this is not a "save $$$" question, this was a curiosity. Joel had once made a comment in a podcast about how there is always someone asking if they can run their system with lots of RAM and no swap, because they have a simplistic view of how memory is managed. This was me, thinking about the ways adding RAM would change my system's behavior.

share|improve this question
3  
Unless you have thousands of servers, I don't see how the difference could possibly make a difference. –  Dennis Williamson Jun 23 '10 at 18:49
3  
Swapping heavily surely will increase power consumption due to increased CPU usage, but the bottom-line issue should be the severe degradation in performance. Just add the RAM. –  Skyhawk Jun 23 '10 at 19:27

4 Answers 4

Perhaps marginally, and more noticeable if you're using SSDs than spinning platters.

With a rotating media drive you're always spending the energy to keep it rotating -- I assume you don't sleep drives in a server. As I recall this is most of the power consumed in a rotating drive. With SSDs there is a higher power draw to write (b/c you're flipping the bits), and as you're not running a motor to keep platters spinning it's a more obvious draw than it would be for writing to a rotating drive.


The bigger energy-win here isn't HD power consumption, it's reduction of wait time (paging chews up CPU cycles that could be better spent doing Real Work: Having the data in RAM as opposed to having to make disk requests means your CPU can finish the task you've given it more quickly and return to an idle state.
Getting your CPU to idle faster/for longer periods of time is more likely to have a measurable effect on power usage (& possibly even thermal dissipation).

share|improve this answer
    
+1 - Thanks for the thoughts. I doubt I'll pick an accepted answer, so I'm plussing any helpful answer. –  benc Jun 23 '10 at 22:00

If the machine is actively swapping for an amount of time during its general use then the RAM upgrade will save energy. The disk(s) will be spinning no matter what, but the reduced head movements and actual writing operations will reduce the energy used by the drive(s). It will also extend the life of the drive(s) by reducing mechanical wear and tear.

If the machine is not actively using swap regularly then the power required to constantly refresh the extra RAM will be larger than the amount of energy used for the head movements and read/write operations.

How to calculate break-even point is I'm not sure (it will depend on the RAM and drives in question, and a detailed view of the machine's load patterns), though doing the calculation probably isn't worth it - I expect the difference to be negligible unless the machine is constantly swapping stuff in and out and even then you'll probably waste more in time working out the saving then you will actually save. The RAM upgrade is probably not a bad idea though as it will reduce the wear-and-tear on the drive, may improve the machines response times so perhaps help you be more efficient, and RAM is cheap these days anyway.

(I'm assuming the server is on 24/7 - if it is turned on (or woke from sleep/hibernate) to work then off afterwards the reduce time operations take due to no swapping would mean you save energy by not running the machine as much and this saving could be large enough to measure if the difference is "X hours in a week" rather than "Y seconds")

share|improve this answer
    
+1 - Thanks for the thoughts. I doubt I'll pick an accepted answer, so I'm plussing any helpful answer. –  benc Jun 23 '10 at 22:01

SSD's provide an interesting case. From a recent Anandtech roundup of SSD/HDs you find a power-draw chart on page 6. You can clearly see that the rotational drive in that roundup draws 1.2w idle and 3.25w writing, compared to the variety of SSDs that draw at minimum 0.21w idle and at most 1.28w writing. Of course, the SSDs will provide more heat as all that electricity is being resisted off rather than doing the work of spinning platters.

As for "how much power does RAM draw?" I haven't been able to come up with a straight-up answer to that, and it does vary by age. DDR2 will draw more per GB than DDR3 due to voltage and feature size differences. One internet wag quoted "10w per RAM stick", which if true means that adding RAM actually increases your power load significantly as you'd be adding two sticks to get the best performance out of your system.

The fact remains that the different from HDD idle and HDD write is small enough that it doesn't take much additional draw to exceed HDD power draw. I suspect that adding physical RAM sticks will actually increase your draw. Now... replacing your existing RAM sticks with higher capacity ones, which might also be created with a smaller feature size, now that would probably reduce overall power consumption.

share|improve this answer
    
Do you have a link to that Anandtech roundup? I vaguely recall reading a SSD/HDD shootout that showed SSDs drawing more power than rotating media (for writes), but I could be mis-remembering (and either way, hard numbers are useful to have :-) –  voretaq7 Jun 24 '10 at 14:52
1  
@voretaq7 The text 'page 6' is actually a link to the roundup I was talking about. It links to the power page. What I think they referred to in the past was the fact that the wattage differential between idle and load is larger than it is for rotational. But rotational still consumes more overall. –  sysadmin1138 Jun 24 '10 at 14:59
    
Hmm, I think the reference I was thinking of had a chart for Read power too & that's probably what I'm thinking of (actuating the voice coil/moving the arm being more expensive than a SSD read). Can't remember where the hell I saw it though - now it's going to bug me! –  voretaq7 Jun 24 '10 at 15:31

Interesting question and very interesting answers.

I am in the upgrade the ram camp for reduced energy consumption. I have not tested this before but I just might now LOL.

I think the disk head movement has to use more energy than ram as the ram has no moving parts.

The interesting comparison would be between SSD's and ram though in a true in-system test.

Count me in if you do run a "test" and get some results though.

share|improve this answer
    
I have thought about getting some kind of meter to measure the cost of my vampire taps... I'm also thinking about turning off my test server on weekends. –  benc Jun 25 '10 at 5:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.