I’ve decided to release one of my simpler scripts for measuring CPU performance on the various whitelisted (and greylisted) BOINC projects. I’ve spent a couple days fixing bugs, making the output more presentable, and increasing the fault tolerance of the code.
<p dir="auto">As some of you may know I’ve also been working on a slightly more accurate method based on completed task data. However I decided that given the connection difficulties with ODLK1, I should not publicly release a script which requests many web pages from the project sites simultaneously and repeatedly, at least at this time. A side benefit of the method used in QuickMag is that it is much faster than the task data method (hence its name). <p dir="auto"><strong>What does the program do? <p dir="auto">The program works by finding the top hosts on each project with the specified model of CPU.<br /> The number of whitelisted projects is obtained from gridcoinstats.eu and used to determine how much total magnitude is allocated to each project. This number excludes greylisted projects, even if they are still included in the results of this script.<br /> The RAC for the top hosts is then divided by the RAC for team gridcoin and multiplied by the total magnitude for the project. This gives the magnitude awarded to each of the top hosts. <p dir="auto">I have decided to return the list of magnitudes and not an average, because there is no easy way to handle the statistics. Depending on the popularity of the CPU model, there may only be one or two people working on a particular project. This and some other intricacies result in the mean values being misleading and that you should look for multiple hosts with similar performance. <p dir="auto"><strong>How do I use CPU_QuickMag? <p dir="auto">I am uploading to bash scripts. The first is: <pre><code> bash UpdateDatabaseFiles.sh [Project Type] [Project Type] can be cpu, gpu, or all <p dir="auto">This script download the necessary host data and team data to perform the calculations in the main script. This downloads and stores around 3GB of data on the local computer if project type cpu is selected. <p dir="auto">The primary script is: <pre><code>bash CPU_QuickMag.sh [CPUid] [#hosts] [output] [CPUid] - CPU id string e.g. 'i7-6700 ' (check CPUlist.data for more examples) [#hosts] - number of hosts to return data for [output] - save output to file name (optional) <p dir="auto">This script scans the previously downloaded files and returns the magnitude of the top [#hosts] with the provided CPU model. The data is saved to the file specified in [output] or printed in the terminal if no file destination is entered. <p dir="auto">There is an additional file: <p dir="auto"><code>CPUlist.data <p dir="auto">This file contains the names of common CPU models formatted to work with CPU_QuickMag.sh <p dir="auto"><strong>Note that spaces need to be preserved, for example 'i7-6700' will return a mix of 'i7-6700 ' and 'i7-6700K' <p dir="auto"><strong>Example Usage <pre><code>$ bash UpdateDatabaseFiles.sh cpu Skipping gpu projects Starting 17 downloads... Progress: 100% $ bash CPU_QuickMag.sh 'Ryzen 5 1600' 4 Missing Host Data: cosmology Missing Team Data: cosmology Project | Top 4 magnitude(s) for Ryzen 5 1600 odlk1 14.99 14.72 14.56 13.65 srbase 6.70 2.62 2.21 2.13 yafu 26.94 14.02 6.14 4.19 tngrid 36.05 4.81 1.89 1.86 vgtu 23.14 22.21 16.79 11.54 DD 9.12 6.00 3.47 2.85 numf 2.32 1.28 1.24 0.92 nfs 11.95 10.44 8.82 6.42 pogs 9.66 8.16 8.10 6.90 universe 50.51 39.73 33.07 14.83 csg 8.58 7.72 5.12 2.49 cosmology 0.00 0.00 0.00 0.00 lhc 22.89 15.76 15.61 9.07 asteroids 8.17 5.72 4.52 3.68 rosetta 12.79 12.24 7.85 7.79 yoyo 27.50 22.59 15.02 11.06 wcg 14.00 12.32 12.11 8.44 <p dir="auto">If data is missing, the code sets the associated values to zero. Also note that DrugDiscovery and Universe are not in the current superblock, but are still listed. <p dir="auto"><strong>Where can I get this script?<br /> Get the script on Github, and try it for yourself!<br /><span> <a href="https://github.com/nexus-prime/QuickMag" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://github.com/nexus-prime/QuickMag <p dir="auto">The GPU version of this will be released if a couple of days. <p dir="auto"><center><img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmVy6oPc9kawbyEMcsntzLPyGeTMhnn4QQ5tYgR3P6htyf/smallGRCopt.png" alt="smallGRCopt.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmVy6oPc9kawbyEMcsntzLPyGeTMhnn4QQ5tYgR3P6htyf/smallGRCopt.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmVy6oPc9kawbyEMcsntzLPyGeTMhnn4QQ5tYgR3P6htyf/smallGRCopt.png 2x" />CPU_QuickMag: Estimate CPU performance for Gridcoin
7 years ago in #gridcoin by nexusprime (50)
$11.15
- Past Payouts $11.15
- - Author $8.47
- - Curators $2.67
37 votes
- vortac: $8.58
- cm-steem: $1.89
- jringo: $0.13
- parejan: $0.09
- cub1: $0.08
- hotbit: $0.08
- remlaps1: $0.03
- alanman: $0.03
- grider123: $0.03
- scalextrix: $0.03
- gregan: $0.02
- cmp2020: $0.02
- barton26: $0.02
- h202: $0.02
- kiebitz: $0.02
- ilikechocolate: $0.01
- steemgridcoin: $0.01
- hownixt: $0.01
- sp33dy: $0.01
- jamezz: $0.00
- and 17 more
Nice post. I have a 1700 myself . I hate that projects with limited accounts offer this much magnitude.
=======================================================================================
This post was upvoted by Steemgridcoin with the aim of promoting discussions surrounding Gridcoin and science.
This service is free. You can learn more on how to help here.
Have a nice day. :)
Good work. One issue is hosts that dont run 24/7/365 or not at 100% load will appear to skew the results. Perhaps you could also include a total of recent results returned per CPU core, which would indicate if hosts have wildly varying duty cycles/% CPU usage?
First of all great work @nexusprime.
Some other area which can cause variation in the output and make @scalextrix comments interesting to take into consideration:
Awesome, I like your scripts!
Thanks to you, I can continue being lazy instead of developing :D
PS: Got a little issue due to my Dutch locales:
CPU_QuickMag.sh: regel 184: printf: 2.4159481835: ongeldig getal
CPU_QuickMag.sh: regel 184: printf: 4.20158347337: ongeldig getal
CPU_QuickMag.sh: regel 184: printf: 3.05274502203: ongeldig getal
CPU_QuickMag.sh: regel 184: printf: 1.09422446442: ongeldig getal
(ongeldig getal = invalid number).
Changed line 184 to
LC_NUMERIC="en_US.UTF-8" printf " %0.2f" "${locMag[@]}" >> $StatsOut
and it works like a charm :)
added the change to github
Ooh! Gonna test out in a while! Will the script work inside Linux subsystem for Windows?
Definitely, that's where I run them.
Great, I won't have to create a VM just to test your script!