Scheduling GPU powerdown over certain time+day ranges - but not CPU?

Message boards : GPUs : Scheduling GPU powerdown over certain time+day ranges - but not CPU?
Message board moderation

To post messages, you must log in.

AuthorMessage
far

Send message
Joined: 17 Jan 12
Posts: 11
Australia
Message 47042 - Posted: 4 Jan 2013, 6:41:41 UTC

Hi
My electricity costs are quite crazy and I'm trying to budget how to save funds.
At peak times of the day between 2pm and 8pm, power costs 4 (four!!) times as much as non-peak.

I don't see the point in turning off CPU processing during peak because the machines have to stay on anyway, so maybe they are already using half the power to tick over anyway.

What I would like to do is power the GPU processing down over time ranges on some days, and leave the CPU stuff running.

There looks to be this sort of control but it seems to only apply to both CPU&GPU inseparably. Is this the case?

If so could it please be a feature request for the future?

Thanks
Far

ID: 47042 · Report as offensive
kdsjsdj

Send message
Joined: 4 Jan 13
Posts: 5
Message 47043 - Posted: 4 Jan 2013, 9:47:20 UTC - in response to Message 47042.  

There is no simple setting(s) to do what you want and you are right it would be a nice feature to have. It is doable, however, but you'll have to do a little work to set it up. It's pretty easy and once it's set up it's fully automatic.

In a nutshell, you create 2 scripts: one to suspend all of your projects that use the GPU and another to resume all of your projects that use the GPU. Then you use Windows Task Scheduler or Linux's cron to run the suspend script at 2 PM and run the resume script at 8 PM.

Note we're talking suspend project not suspend GPU so if you have a project that sends you plain CPU tasks as well as GPU tasks then its CPU tasks will be suspended along with its GPU tasks.

That's one way to do it. There is another way. You specify an certain app to be a GPU exclusive app. Whenever that app runs BOINC will notice it's running and shutdown GPU usage. Then you use Windows Task Scheduler or cron to start that app at 2 PM and kill it at 8 PM. You chose a non-CPU intensive app such as Notepad to designate as the GPU exclusive app or designate a script that sleeps it's entire life away as a detached process and uses less RAM than Notepad.

I can give you everything you need for the first method on Windows and Linux. For the second method I can't remember how one kills a process from a batch file on Windows right at the moment and there is a slim chance there may not be a way to do it. On Linux it's easy. For Windows I'm sure someone will come along soon enough and tell us how to kill a process.

If you're down I'll give details, if not then wait for the feature to be added.
ID: 47043 · Report as offensive
far

Send message
Joined: 17 Jan 12
Posts: 11
Australia
Message 47050 - Posted: 5 Jan 2013, 0:23:59 UTC - in response to Message 47043.  

Thanks kdsjsdj, all windows here so no ps/grep/cron/kill.

According to http://boinc.berkeley.edu/wiki/Boinccmd_tool --set_gpu_mode put's the GPU tasks into a sleep state for however long you specify, then they go back to default state. I'm much happier with than using windows taskkill command in case it trashes the work to date on a unit (as GPUgrids' 8hr+ ones may break my payback calcs - see later)

I just tested this for short time periods - it should work in a batch file also for 28800 seconds/6hours (altho the short time tests seem to sleep longer than the specified timeout? Maybe overhead on stop/start's?):
"C:\Program Files\BOINC\boinccmd" --set_gpu_mode never 28800

I also tested short sleep on a machine with 2 GPU's and it worked on that (and the 4 GPU tasks from 2 projects that were swapping process time). So GPU sleeping during peak power cost period issue should resolve OK.

On to why a feature request and payback calcs. My depressing power bill's about AUD8000 pa (USD $8400) thus why I'm pretty keen to try anything to fine tune this (6k of this would be boinc). By rough estimates I can buy approx 1.25 GPU's a year in power savings by powering down GPU's during peak 6hr period. I've got spare slots so after less than a year we've ahead and the power company can get stuffed.

I doubt I'm alone in this situation, so is there somewhere I can officially request this as a feature in the future so it isn't necessary to schedule tasks?

Thanks Far
ID: 47050 · Report as offensive
kdsjsdj

Send message
Joined: 5 Jan 13
Posts: 81
Message 47051 - Posted: 5 Jan 2013, 1:37:35 UTC - in response to Message 47050.  
Last modified: 5 Jan 2013, 1:41:45 UTC

To request as a feature find the Trac system on the BOINC website homepage. IIRC correctly it's not the upper Documentation link but the lower Documentation link that takes you to Trac. On the first opportunity register and obtain a Trac account and password. Click around until you find the link to do with Submit a Ticket or Search for a Ticket or something like that. Search to see if a similar ticket already exists. If you cannot find one create a new ticket, click the box that designates it as a new feature request as opposed to a bug report.

Regarding the killtask... I was suggesting to use that to kill the app designated as a GPU exclusive app not the science app running under BOINC. The GPU exclusive app would be, for example, an instance of Notepad that isn't doing anything. The only reason you start the GPU exclusive app is to cause BOINC to suspend GPU apps. You ensure it's an app that does noting or a batch file that sleeps its useless life away until you kill it.

I completely forgot about the --set_gpu_mode parameter for boinccmd. That's the one you want to use. It's more selective and has the duration argument as well which automatically resumes the tasks. Good spotting!

You mentioned something about GPUgrid and I'm wondering if it's to do with ensuring the task gets completed and returned in time for the credit bonus for quick completion and return. It is conceivable that you might suspens a GPUgrid task at 2 PM when it has only say 15 minutes remaining to completion and the deadline for the credit bonus is only 4 hours away. If you follow the 2 PM to 8 PM regimen you mentioned earlier you would miss the bonus deadline by 2 hours in this example. With a little Python scripting or perhaps even Windows Powershell you could peek at the time to completion before suspending GPU usage and decide if you would like to go a few minutes past the 2 PM mark to get the task completed and returned and scoop the bonus credits. That's the deluxe version.

Just curious....with all the sun I imagine you to receive in Australia (and perhaps I'm wrong about that) would it not be advisable for you to invest in solar panels and perhaps wind generators first before investing in GPUs? $6000 per year for the GPU(s) alone is almost more than I can believe. Here in Alberta, Canada where we have the cheapest electricity in the world (barring a few Arab countries where I hear they practically give gasoline and electricity away in exchange for fealty to the monarch), I've invested in solar and wind and plan to invest more... it does pay off. Any young person just getting into his first property in areas where renewable is viable (it isn't viable everywhere) is making a bad investment decision IMHO. I'm assuming they have a yard and room as most of us are fortunate enough to have in Canada and Australia, it isn't as easy if the biggest property you'll ever own is a 4 room suite (flat) in London, no pool, no pets and no solar panels allowed on the roof.
ID: 47051 · Report as offensive
far

Send message
Joined: 17 Jan 12
Posts: 11
Australia
Message 47053 - Posted: 5 Jan 2013, 5:48:34 UTC - in response to Message 47051.  

Thanks kdsjsdj

Sorry I wasn't clear re GPUgrid - I was worried about forced termination of GPUtasks that can run for longer may cause the unit to be terminated without credit - but all's OK with the --set_gpu_mode.

Unluckily I live in an urban flat and can't put up solar or wind (have tried). Part of the reason my electricity costs so much is it is purchased as green power (the electrons I get are probably from burning coal, but they buy wind generated ones from somewhere far off and add that into the grid). This adds ~25% onto the base cost. Of the total bill (based on comparision with non-boinc mates) probably 2k of the bill is normal usage, so the rest is this bunch of thinking heaters doing their maths. I would think the GPU's would probably account for about half this so 3k and CPU's 3k. At least I don't have a heating issues in winter :-)
ID: 47053 · Report as offensive

Message boards : GPUs : Scheduling GPU powerdown over certain time+day ranges - but not CPU?

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.