Page 1 of 2

Need help in cpu usage tuning

Posted: Tue May 26, 2020 3:56 pm
by gadolf
Hi,
I've been contributing for almost a month now, and cpu usage is 25% (light).
Two days ago I saw viewtopic.php?f=108&t=35189&hilit=ubunt ... 30#p333876 and changed etc/fahclient/config.xml slot tag to this:

Code: Select all

  <!-- Folding Slots -->
  <slot id='0' type='CPU'>
       <cpus v='4'/>
  </slot>
Before changing, it was like this:

Code: Select all

  <!-- Folding Slots -->
  <slot id='0' type='CPU'/>
Yesterday I received a new WU and CPU usage ramped up to 100%.

The power tag shows like this:

Code: Select all

  <!-- Slot Control -->
  <power v='LIGHT'/>
Also, the web page also shows Power as Light.

I will let this wu finish, but I would like to know what should I do if I want to reduce to medium or light.

I'm on ubuntu 20.04 server

Re: Need help in cpu usage tuning

Posted: Tue May 26, 2020 4:00 pm
by NRT_AntiKytherA
take out the cpus v=4 line and save the change. then post the exact specification of your CPU please It may not correspond to what the other guy has at all which would mean a higher than intended work load for your own CPU

Re: Need help in cpu usage tuning

Posted: Tue May 26, 2020 4:09 pm
by gadolf
Thaks, @NRT.
While you were posting your answer, I changed cpus v=2, then reload (sudo /etc/init.d/FAHClient reload) and it immediately droped cpu usage to 50%.
I think this is it, right?

Re: Need help in cpu usage tuning

Posted: Tue May 26, 2020 4:55 pm
by NRT_AntiKytherA
looks like it given the load drop, if you are happy with 50% then happy folding ;)

Re: Need help in cpu usage tuning

Posted: Tue May 26, 2020 5:44 pm
by gadolf
NRT_AntiKytherA wrote:looks like it given the load drop, if you are happy with 50% then happy folding ;)
I would like to go at full power, but I'm afraid of toasting the machine :e?: . It's a fanless micro-Atx sat on a room without ar condiotining, so...

Re: Need help in cpu usage tuning

Posted: Tue May 26, 2020 5:47 pm
by gadolf
And one more question: it seems that the power tag is overridden by the number of cpus I put in the slot tag. Is that right?
EDIT: And another one: Isn't this cheating, what I've done? I've set it up to full power, received a WU accordingly, more points, then I lower the power. In the end, I end up by having a higher score. Am I risking of being banned or something?

Re: Need help in cpu usage tuning

Posted: Tue May 26, 2020 6:48 pm
by kiore
gadolf wrote:And one more question: it seems that the power tag is overridden by the number of cpus I put in the slot tag. Is that right?
EDIT: And another one: Isn't this cheating, what I've done? I've set it up to full power, received a WU accordingly, more points, then I lower the power. In the end, I end up by having a higher score. Am I risking of being banned or something?
The server 'sees' the number of cores available eg 2,4,8 and the type of processor and operating system when it assigns a unit, am not sure it can take into account light, medium etc or even how many hours a day these cores/cpus are active. Your score is calculated at the end of the workunit the estimate you see assumes it is calculating from an average. Your score could be 50kppd but then if you switch off for 6 hours and it will recalculate.

Re: Need help in cpu usage tuning

Posted: Tue May 26, 2020 6:59 pm
by NRT_AntiKytherA
You can't cheat the points system, what you see is an estimate of the final value. It goes down the longer the work unit takes to complete so even if you reduce folding power mid-working unit there's no points gain. Also, it is advisable not to adjust cores etc. when a unit is in progress as you may corrupt any existing work done on it and have the work rejected at the end if it doesn't start again from zero percent.

Re: Need help in cpu usage tuning

Posted: Tue May 26, 2020 7:34 pm
by gadolf
Thank you guys!

Re: Need help in cpu usage tuning

Posted: Tue May 26, 2020 10:37 pm
by Joe_H
gadolf wrote:And one more question: it seems that the power tag is overridden by the number of cpus I put in the slot tag. Is that right?
That is correct. An explicit value for the number of CPU threads will mean that is used, the setting for the slider no longer changes the thread count. All it will do at this point is pause the GPU if you move it to Light.

Re: Need help in cpu usage tuning

Posted: Mon Jun 01, 2020 11:00 am
by gadolf
Also, it is advisable not to adjust cores etc. when a unit is in progress as you may corrupt any existing work done on it and have the work rejected at the end if it doesn't start again from zero percent
Are there specific log messages indicating that the work has been rejected?

EDIT: I suspect it has been the case with this last WU, specially considering that I interrupted it a couple of times, but I'm not 100% sure, and I can't see anything in the log associated to a possible work rejection. I was expecting a score increase in the last 24 hrs, but, again, I'm not really sure if hasn't happened and that I just don't remember what was my previous score.
EDIT2: The last log messages regarding the finished WU are these:

Code: Select all

09:16:04:WU01:FS00:Upload complete
09:16:04:WU01:FS00:Server responded WORK_ACK (400)
09:16:04:WU01:FS00:Final credit estimate, 2024.00 points
09:16:04:WU01:FS00:Cleaning up

Re: Need help in cpu usage tuning

Posted: Mon Jun 01, 2020 4:37 pm
by MeeLee
You can go to this site below, and search for your username.
You'll see your last uploaded WUs:

https://apps.foldingathome.org/cpu

You also can download a temperature monitoring service.
For Windows, HWMonitor works well.
For Linux, lm-sensors (sudo apt install lm-sensors) works well, if your motherboard has the sensors to see CPU temperatures.
If the temperatures are below 75W you're good. Any higher and I would check online to see how high the CPUs are meant to run at.
You can always add a fan, a case fan, or even a USB fan if it needs some form of active cooling.

Re: Need help in cpu usage tuning

Posted: Tue Jun 02, 2020 11:03 am
by gadolf
Thanks.

As for the temperatures, the lack of a fan is a main requirement, since I have this server in a room where I don't want fan noise, specially because it runs 24x7.

I've been monitoring the temperature and other basic variables with Cacti since I started folding and so far so good:

Image

The max temperature of 78 that shows in the graphic refers to when I tweaked power to maximum. After a day or so I decided to go medium, since the temperature raises to 74 at most. The load average graphic shows well these changes.

The temperature graphic uses lm-sensors output.

Re: Need help in cpu usage tuning

Posted: Tue Jun 02, 2020 8:39 pm
by MeeLee
I would recommend you to install an 80mm case fan of your choice (fat ones for more airflow, or slim ones fitting in tight spaces), with a 3 or 4 pin power connector, then buy a USB to 4-pin connector, like this:
https://www.amazon.com/dp/B07JW73KVR

Running the 12V at 5V is perfectly safe, and allows your system to receive active cooling without the noise.
Most Noctua fans offer less than 17dB of fan noise at 12V, and at 5V, it's less than 1/3rd of that (=virtually silent).

Re: Need help in cpu usage tuning

Posted: Tue Jun 02, 2020 9:45 pm
by gadolf
Cool! (pun intended :wink: )
Didn't know about that kind of hardware.
Maybe it's worth giving a try, indeed.
I just looked at the prices here (BR) and, for what it is, it's salty! US$ 30 for what it seems a more a less common fan :eo https://produto.mercadolivre.com.br/MLB ... ebfc8467e4
But the vendor says it comes with usb adapter.
Also, do you think any usb port will power it?
These are the motherboard specs: https://www.msi.com/Motherboard/J1900I/Specification