Page 1 of 2

CPU all the time, GPU only on Idle

Posted: Wed Apr 15, 2015 3:13 am
by ITgreybeard
Hey! I saw allusion to there being a setting to run the CPU continuously but the GPU only on idle. How is that accomplished? And if Idle is defined as Monitor powered down, is it the case that the FAH screensaver will display CPU work only?

Re: CPU all the time, GPU only on Idle

Posted: Wed Apr 15, 2015 5:49 am
by bruce
Welcome to foldingforum.org, ITgreybeard.

That's the default if your slider is still set to the default of MEDIUM (or you can adjusted if you've moved it) except for laptops running on battery.
If you use the Advanced Control, you can configure that if you don't already have it.
The FAH Screensaver is not required. Idle is defined as Monitor in PowerSavings mode with the CPU running.

Re: CPU all the time, GPU only on Idle

Posted: Wed Apr 15, 2015 6:41 am
by ITgreybeard
Well, then, I am a bit confused by reality (not the first time!). :? Below is a [large] screenshot of my system with FAH set at Medium "While I'm Working". The cpu cores are appropriately employed, but the gpu has also taken on a max workload.

The Web Control Panel shows the Medium/While Working selection, the Advanced Control Panel echoes the Medium part, but shows Folding Slots 0 and 1 both running. The AMD System Monitor over on the left confirms that the gpu is being well pegged.

Image

Interestingly, a Light power setting on the Advanced Panel achieves a pretty constant 50% CPU utilization and anywhere between 0% and 38% GPU load, with a strong tendency toward zero. See the screenshot below.

It appears as though I can accomplish the GPU idle on the Light setting. Would the log shed any light on this behavior?

Image

Re: CPU all the time, GPU only on Idle

Posted: Wed Apr 15, 2015 3:04 pm
by bruce
The V7 client is designed to use 100% of the otherwise unused CPU resources (unless you change some settings). Running both the Web Control application and the Advanced Control application is attempting to manage the same resources two different ways. Use the slider that's at the top of the Status panel and close the web client.

Each GPU requires one free CPU. I see you have CPU:4 set plus one for the GPU. Does that mean that your other applications typically use 3 cores, or is that the Chrome client I see mostly covered up? Seeing system monitor with just FAHControl would be more useful.

FAH isn't supposed to use any GPU resources with the LIGHT setting. What other applications do you have running that might be using the GPU? Seeing the yellow "Paused: Waiting for idle" means the idle mode has activated properly, which makes no sense.

Re: CPU all the time, GPU only on Idle

Posted: Wed Apr 15, 2015 9:26 pm
by davidcoton
@bruce, CPU:4 is the "Light" setting for an 8-thread CPU. Running "Medium" makes it CPU:6 (top image).

The question is, why does the GPU run on "Medium", when it is expected to wait for idle as on "Light"?

Or are we wrong about that? Is it necessary to set the wait for idle as a GPU slot option, and configure the CPU slot as CPU:6 or possibly CPU:7?

Re: CPU all the time, GPU only on Idle

Posted: Wed Apr 15, 2015 11:15 pm
by 7im
They current version 7.4.4 GPU folds on idle for the Light setting only. Medium and Full fold on the GPU all the time.

So here is the trick. Move the Slider to Medium or Full, however you want your CPU to fold (aka # of cores to use). Then in FAHControl, right click on the GPU slot, and select the option called "On Idle"

Now the CPU slot runs all the time, and the GPU waits until idle.

You can do the same thing in the Web Control, but you have to select each tab, and set them individually by tab.

Re: CPU all the time, GPU only on Idle

Posted: Wed Apr 15, 2015 11:21 pm
by davidcoton
Thanks, 7im, that's another tip I hadn't realized before -- despite using other context menu options!

Re: CPU all the time, GPU only on Idle

Posted: Fri Apr 17, 2015 2:28 pm
by ITgreybeard
Hello! I was away for the last couple days, but it looks like some tricks and tips have surfaced in that time. Here's still a question welling from my current ignorance: Can I specify a given number of cores to use while I am working, and a greater number (or max) of cores when the system is at idle?

Re: CPU all the time, GPU only on Idle

Posted: Fri Apr 17, 2015 3:27 pm
by Joe_H
As the client is set up now, no. That is something I also have considered as a feature I would like, and have considered putting together a script to do the same through the FAHClient's telnet interface.

The closest you can get with the current client is manually moving the slider and leaving the core count in the configuration at -1. Then if you move the slider to the different positions of Light, Medium, and Full you will get 4, 6 or 7 cores used respectively with your setup.

Re: CPU all the time, GPU only on Idle

Posted: Fri Apr 17, 2015 3:58 pm
by ITgreybeard
Please excuse me for being so concrete, but I'll ask a couple operational questions. It comes from my long (and old) computer background, which has me preferring a "road map" over "let's push a button and see what happens."

So, do I "manually move the slider" as a first step (if so, to what position?), or is this referring to the last sentence in the paragraph?
Where do I enter the -1 core count? I see no obvious place in the Advanced Control Configure window. Is it in the "Expert" area?

On a related tack, it would be "lovely" for there to be the option of "idle" to be triggered when the screensaver kicks in as opposed to waiting for the monitor to go offline. Programmatically that might be too "interesting" to code over multiple operating systems, but for someone like me whose screen saver initiates after 5 minutes but whose monitor closes down only after 60 minutes, and who steps to and away from the keyboard many times per day, it might get in a lot more processing. However, I'm sure this has been proposed before, so there likely is a very good reason for it to be as it is.

Re: CPU all the time, GPU only on Idle

Posted: Fri Apr 17, 2015 4:52 pm
by Joe_H
First, the -1 value for CPU usage is the default value for a CPU slot. So if you have not set anything else, that is the value that is already stored. That value lets the number of cores be set by either the Web Control or Advanced Control (FAHClient). Otherwise with a positive value set between 1 and the total number of cores available, the client uses just that many cores and the slider does not change the number utilized.

To set a defined value, in FAHClient first click on Configure, select Slots and click on the CPU slot listed to select it. Then you can Edit the slot configuration, there is a box to select a number value at the top of the Edit page.

The number of CPU cores used at various slider settings is as follows:

Full - all cores minus one reserved for GPU processing
Medium - one less core than at Full
Light - half the available CPU cores

With the current version 7.4.4 client, moving the slider will cause the client to pause folding, store the new setting and then resume at the changed setting. So as an example, with your system if the slider was at Medium and you moved it to Light, the client would go from using 6 CPU cores to 4.

More information on how the client works and configuring it can be found through The Software link at the top of forum pages. Some information on the Introduction to V7 and Intermediate V7 FAQ pages need updating to reflect changes made in the 7.4.4 client, but should be enough to give a general idea of the settings.

As for the screensaver, there are a number of issues related to it. They may or may not get fixed. Some of the delays in idle detection and starting folding while Idle are meant to avoid a too brief period causing folding to start and then be immediately interrupted when a user comes back.

Re: CPU all the time, GPU only on Idle

Posted: Sat Apr 18, 2015 2:44 am
by bruce
My GUESS is that a feature that adjusts the number of cores based on idle will probably never happen (though I'd like to see it). The fundamental problem is that the software is designed for scientists who dedicate their entire machine to solving a simulation as quickly as possible. The @home version allows you to "redesign" your hardware to be smaller than it really is. Changing that number in the middle of a simulation is a really big deal, and if you stop the simulation, change the number of CPUs, and resume the simulation, it will work, but you'll get a warning message saying this has been known to cause problems. ... but it mostly works if when you stop/resume although it restarts from the previous checkpoint which may be ~15 minutes earlier.

As an alternative, you can create two CPU slots. Suppose you have 8 CPUs and you run a CPU, so you can allocate 7 to processing. Suppose you want 4 to run when the machine is NOT idle and 3 more when it is idle. Create a CPU:4 slot that runs 24x7. Create another with CPU:3 that runs on idle. They'll work on different WUs, one which runs continuously and one which gets interrupted when you move the mouse. This may not produce the maximum science (maximum points) but it does fit your criteria and it's not really stretching the options very much more than the default. Settings like this can only be done in the Advanced Contol app and you'd want to set the slider to the maximum and forget it.

Re: CPU all the time, GPU only on Idle

Posted: Sat Apr 18, 2015 4:49 am
by ITgreybeard
That sounds pretty reasonable. And alternate-slotting core subsets was a feature that I hadn't been aware of, and so hadn't considered. I have to admit that I am an @home type, and need my machine responsive to my requests. But obviously 4 cores HT'd to 8 is more than my typical use will require, outside SolidWorks and Handbrake and a few other periodic cpu and gpu barn-burners.

Oh - an oddity that I haven't found a way to document yet; I am not even sure who to report it to, but here goes. I mentioned above that my GPU was sometimes running up to 40% utilization with FAH paused. You, Bruce, asked "What other applications do you have running that might be using the GPU?" Well, there was no other graphics-intensive app running, and yet I could reproduce the phenomenon with FAH unloaded entirely. Trial and more trial led me to something entirely unexpected but entirely reproducible. It was like finding a kangaroo in my yard! (And I don't live down under.)

When certain web pages have the focus within the IE 11 web browser, the gpu jumps from 0% to 30-40% - but only when IE is in maximum-window mode. When another tab has the focus, or when the focus is on another app in the environment, or when IE is running in a "restored" window, the gpu drops back to 0%. It must be a strange interaction of local and web code with my hardware and drivers for this to happen, but it may point out some issue with IE or opencl or javascript or ???.

Perhaps you can suggest to me a good monitor-recording program that will let me demonstrate it - but where and to whom? I tried Total Recorder Video Pro, which I have used very successfully on the audio side, but it seems to kick out after saving just a few frames. Perhaps my monitor size of 1920 x 1080 pixels bothers it.

Re: CPU all the time, GPU only on Idle

Posted: Sat Apr 18, 2015 9:33 am
by Napoleon
ITgreybeard wrote:When certain web pages have the focus within the IE 11 web browser, the gpu jumps from 0% to 30-40% - but only when IE is in maximum-window mode. When another tab has the focus, or when the focus is on another app in the environment, or when IE is running in a "restored" window, the gpu drops back to 0%. It must be a strange interaction of local and web code with my hardware and drivers for this to happen, but it may point out some issue with IE or opencl or javascript or ???.
Just like Chrome and Firefox, IE11 has GPU acceleration enabled by default. It is possible to revert to software rendering, see Internet Option :arrow: Advanced.

Re: CPU all the time, GPU only on Idle

Posted: Sat Apr 18, 2015 11:32 pm
by bruce
IE11 is not the only software that assumes (1) The GPU can be expected to be idle, so use whenever you can and (2) GPU rendering is faster than CPU rendering. Systems which run FAH don't happen to fit those assumptions. Like Napoleon suggests, most such software provides some kind of a setting which basically says "Don't use by GPU; use my CPU instead."

In the "old days" rendering with CPU software was considered "fast enough" and for me, it still is.

There's no reason to search for a good monitor to document the problem. (1) It's not a FAH issue, and (2) those who design software have to make a default choice and then they generally provide a mostly hidden switch where you can choose the alternative setting.