Bitcoin Forum

Bitcoin => Mining => Topic started by: AngelusWebDesign on June 04, 2011, 04:30:53 PM



Title: Why does Poclbm use Khash -- how many in a Mhash?
Post by: AngelusWebDesign on June 04, 2011, 04:30:53 PM
Yes, I know it sounds like a dumb question --

But

A) why does Poclbm -- alone -- use khash as its standard unit of measurement (this can't be configured on the command-line either -- a big oversight if you ask me

B) How do I compute my MHash/s -- you know, to compare apples to apples with other miners? Divine by 1000, or 1024?

I know the textbook answer is 1024, but how do I know that's how all miners are written? Hard drives routinely call themselves "80 GB" even though they mean "80 billion bytes" so the hard drive ends up being 76 GB on your machine.

I'd like to know if 275755 khash/s is 269 Mhash/s or 275.7 Mhash/s -- it might make the difference of using Poclbm or not.


Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: Nesetalis on June 04, 2011, 04:36:20 PM
okay apparently you don't read you text book so well :P

pico, nano, micro, milli, centi, deci, deca, hecto, kilo, mega, giga, tera, peta, exa, zetta, yotta..

these are all SI prefixes... they are 1000.

binary base values however are different, requiring powers of 2 instead of powers of 10.. that is why its 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, and so forth...

but these do not conform to standard SI.



Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: Zagitta on June 04, 2011, 04:37:23 PM
"k" is 1000 no matter what, even when it's used in kb and kB...

what fucks the above harddrive space calculation up is the bit to byte conversion because 1 byte = 8 bit not the k...

Also dividing by 1000 is not hard so it's hardly an oversight, in fact poclbm shows a more precise hashing rate than the other miners...


Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: yrral on June 04, 2011, 04:42:25 PM
"k" is 1000 no matter what, even when it's used in kb and kB...
Wrong. 1 kilobyte is 1024 bytes. 1 kilobit is 1024 bits.


Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: AngelusWebDesign on June 04, 2011, 04:46:53 PM
See what I mean.

How hard would it be for Poclbm to display hashrate in Mhash/s? It's the accepted standard.

I mean, this is a GPU miner, not a CPU miner!

When you're mining 550 MHash/s, you don't care about what comes after the decimal point.


Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: Stammi on June 04, 2011, 04:57:24 PM
His question is: Should he divide by 1000 or 1024, to compare the Mhash/s with other miners, which shows the rate directly in Mhash/s. ;)


Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: Zagitta on June 04, 2011, 05:02:04 PM
"k" is 1000 no matter what, even when it's used in kb and kB...
Wrong. 1 kilobyte is 1024 bytes. 1 kilobit is 1024 bits.

1 kilobit is not 1024 bit: http://en.wikipedia.org/wiki/Kilobit

You are however right about kilobyte but as said by Nesatalis bytes doesn't conform to the SI standart wich i was reffering to


Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: SteveB on June 04, 2011, 05:09:50 PM
I would assume it's 1000. Mhash and Khash is just a measure of how many hashes per second and have nothing to do with bits and bytes.


Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: gentakin on June 04, 2011, 05:11:28 PM
"k" is 1000 no matter what, even when it's used in kb and kB...
Wrong. 1 kilobyte is 1024 bytes. 1 kilobit is 1024 bits.

Actually, the unit you're talking about is called "kibibyte" or "kibibit". That's what https://secure.wikimedia.org/wikipedia/en/wiki/International_Bureau_of_Weights_and_Measures recommends.
Of course, usually 1megabyte=1024kilobyte is used nevertheless.

This doesn't apply to hashes, so 1mhash = 1000khash.


Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: kr105 on June 04, 2011, 05:40:45 PM
Ufasoft does this:
Code:
cerr << "\r" << setprecision(3) << (nProcessed/(now-dt).TotalSeconds/1000000) << " MHash/s     " << flush;

Phoenix:
Code:
def formatNumber(n):
    """Format a positive integer in a more readable fashion."""
    if n < 0:
        raise ValueError('can only format positive integers')
    prefixes = 'KMGTP'
    whole = str(int(n))
    decimal = ''
    i = 0
    while len(whole) > 3:
        if i + 1 < len(prefixes):
            decimal = '.%s' % whole[-3:-1]
            whole = whole[:-3]
            i += 1
        else:
            break
    return '%s%s %s' % (whole, decimal, prefixes[i])

If i'm not wrong, both miners divide the hashes per 1000.


Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: fpgaminer on June 04, 2011, 05:44:27 PM
Since it hasn't been made clear:


1 Megahash / second == 1,000 Kilohash / second == 1,000,000 hash / second


Title: Re: Why does Poclbm use Khash -- how many in a Mhash?
Post by: supa on June 04, 2011, 10:15:09 PM
1 Megahash / second == 1,000 Kilohash / second == 1,000,000 hash / second

So, what you're saying is... divide my Kilohash score by 24, then multiple by powers of 1,000? :)

Joking aside, it's an easy mistake I suppose.

For all intents and purposes, when you're counting things that aren't from base 2, it should be a completely safe assumption that K (as in kilometer) is 1,000 x 1 meter and not 1,024.

Kilometers, gigawatts, megahashes, cycles per second (Hertz), etc, etc are all 1,000.  Please do not try to multiply your 900MHz GPU card clock by 1024 * 1024....