| 1 | = Generalizing credit = |
| 2 | |
| 3 | Note: in the following |
| 4 | * FLOP = floating-point operation |
| 5 | * FLOPs = plural of FLOP |
| 6 | * FLOPS = FLOPs per second |
| 7 | |
| 8 | The current credit system is based on FLOPs: |
| 9 | a 1 GFLOPS computer running BOINC all the time gets 200 credits per day. |
| 10 | We did things this way because BOINC was designed to support |
| 11 | scientific computing, where most apps are floating-point intensive |
| 12 | and FLOPS is the standard unit of performance |
| 13 | (for example, supercomputer performance is measured in FLOPS). |
| 14 | |
| 15 | For grant-writing purposes I need to be able say |
| 16 | "BOINC has a peak performance of X PetaFLOPS"; |
| 17 | the current credit system lets me do this. |
| 18 | |
| 19 | Recently, a new project (Bitcoin Utopia, or BU) started. |
| 20 | Their jobs involve Bitcoin mining, |
| 21 | which consists of computing SHA256 hash functions. |
| 22 | This is an integer algorithm. |
| 23 | It can be done on CPUs and GPUs, but it can be done much faster on ASICs. |
| 24 | These ASICs can only do hashing; they can't do floating-point math, |
| 25 | and they can't be used by any BOINC project other than BU. |
| 26 | |
| 27 | The question was: how should BU grant credit for its jobs? |
| 28 | One approach is to decide on an "equivalence" between hashes and FLOPs, |
| 29 | and assign credit based on the current formula. |
| 30 | How many FLOPs is a hash equivalent to? |
| 31 | One approach is to look at a CPU or GPU, measure its FLOPS and its hashes/sec, and divide. |
| 32 | Depending on the device, this gives an answer in the range of 1,000 to 10,000 FLOPs per hash. |
| 33 | |
| 34 | BU did more or less these things, which are completely reasonable. |
| 35 | But it turns out - because ASICs are so fast - |
| 36 | that BU is granting huge amounts of credit. |
| 37 | With less than 1,000 users, BU is granting more credit than the 300,000 users of all other projects combined. |
| 38 | |
| 39 | This situation has 2 undesirable consequences: |
| 40 | |
| 41 | * Credit no longer measures FLOPs; BOINC's combined average credit |
| 42 | no longer measures its peak performance in FLOPS. |
| 43 | * The competitive balance between projects is lost. |
| 44 | BU will always grant far more credit than other projects, |
| 45 | for a type of computation that is specific to BU |
| 46 | and is not usable for other projects. |
| 47 | |
| 48 | == Proposal == |
| 49 | |
| 50 | The basic problem is that we have a credit system based on FLOPs, |
| 51 | but we want to give credit for things (like hashes) that are not FLOPs. |
| 52 | A similar situation actually already exists in BOINC. |
| 53 | We'd like to be able to give credit for disk storage and network communication; |
| 54 | some projects have applications that use these resources rather than computing. |
| 55 | But there's no obvious way to translate storage or bandwidth into "equivalent FLOPs", |
| 56 | and even if there were, we'd be destroying the meaning of credit as a measure of FLOPs. |
| 57 | |
| 58 | So, I propose that, rather than trying to shoehorn everything into one number, |
| 59 | we keep track of multiple types of credit. |
| 60 | In particular, I propose 4 types: |
| 61 | |
| 62 | * Computing credit: general-purpose FLOPs, i.e. what we have now. |
| 63 | * Disk storage, measured in byte/seconds. |
| 64 | * Network throughput, measured in bytes, the sum of upload and download. |
| 65 | * Project-specific credit. |
| 66 | Projects can define and grant this however they like. |
| 67 | For BU, this would be hashes. |
| 68 | Other projects, like Wildlife@home, might grant credit for |
| 69 | a human activity like annotating video. |
| 70 | |
| 71 | The BOINC database would maintain each of these types of credit |
| 72 | for each host, user, and team. |
| 73 | It would store both total and recent average for each type. |
| 74 | |
| 75 | The new types of credit would be included in |
| 76 | the XML statistics files exported by projects. |
| 77 | Statistics sites (such as BOINCStats) could be extended to |
| 78 | show the new types of credit. |
| 79 | |
| 80 | == Discussion == |
| 81 | |
| 82 | Eric pointed out the possibility of a variant of the SETI@home app |
| 83 | that uses an ASIC or FPGA to compute FFTs. |
| 84 | What if these were 1000X faster than GPUs or CPUs? |
| 85 | We'd have the same problem as we do now with BU. |
| 86 | |
| 87 | My feeling about this is that computing credit should be measure |
| 88 | 'general-purpose' FLOPs, i.e. FLOPs that are usable by most science applications. |
| 89 | FFT FLOPs are not general-purpose. |
| 90 | So the right thing would be for SETI@home to grant both computing credit |
| 91 | and project-specific credit. |
| 92 | CPU and GPU jobs would be granted both; |
| 93 | jobs done by ASICs or FPGAs would be granted only project-specific credit. |
| 94 | |
| 95 | Similarly, BU could grant computing credit for mining jobs done by CPU or GPU; |
| 96 | but for ASIC jobs it would grant only project-specific credit. |
| 97 | |
| 98 | Of course this is all subjective and fuzzy; |
| 99 | you might argue that GPU FLOPs are not general-purpose because |
| 100 | some apps don't map well to GPUs. |
| 101 | But we need to draw a line somewhere, |
| 102 | and I think we've reached a point where GPUs can be considered general-purpose. |