Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The "two wrongs" hostname is apt. Hertz is for periodic phenomena; becquerel is for radioactive decay. The SI brochure discourages the use of counting units such as 'request'. The number of requests is regarded as just a number, or at best a quantity that is referred to the unit one. The applicable SI unit therefore is just the reciprocal second, s^(-1).

In practice, counting units are used everywhere (e.g., in MB/s, the byte is a counting unit), but I am relaying what the SI brochure actually says on this question.

Ref: https://www.bipm.org/en/publications/si-brochure/



It can, in my experience, be very useful to introduce a unit for ‘requests’, as well as one for ‘CPUs’.

It lets us produce dimensionally valid formulae for relating request rates (in requests per second) to compute requirements (in CPU seconds per request), data transfer (in bytes per request), and bandwidth (in bytes per second).

I kind of wish software engineering’s computer science underpinnings offered a few more of the kind of notational underpinnings that physics offers mechanical or electronic engineers.

Why don’t we have a standard set of letters for representing data sizes, requests, compute units, etc; and a set of widely known formulae as familiar to every programmer as V=IR is to an electrical engineer?

The only standard symbol computer science has given us (or maybe more accurately that we have taken up) is n, as in O(n), for collection sizes.

I wonder if we can do better?


ISO 80000 Part 13 gives some symbols within the scope of communication technology (its scope is more narrow than its title would suggest). The standard itself is copyrighted but the quantity symbols are listed on Wikipedia, https://en.wikipedia.org/wiki/ISO/IEC_80000#Part_13:_Informa...

See also https://www.nist.gov/publications/quantities-and-units-softw...


That is fascinating. Are there any examples of ‘fundamental laws’ expressed in these terms?


Being careful to distinguish 'fundamental laws' from just 'quantities that we defined', information theory and queueing theory have some good examples of proven laws.


In reference to (per duration) values "requests per second" is ambiguous, what is a request?

Instructions per seconds exists but is only useful for comparing tasks on the same hardware and architecture. We saw the abuse of MIPS for comparing machines in the past just as we see it with FLOPS in GPUs today.

MIPS benchmarks like whetstone differ even on the same CPU depend on the language used, compiler used, and the options at compile time. TPC, SPEC and other synthetic benchmarks just succumbed to game theory and usually don't apply to real world loads.

The field you want to look into is "Queuing Theory"

If you are lucky enough that you can assume your system is Markovian you get simple formula like:

mean service time == 1/(mean service rate)

To show just how old it is here is a good paper about M/M/1 queues from 1958 that is still useful today.

https://msp.org/pjm/1958/8-1/pjm-v8-n1-p08-s.pdf


In reference to V=IR, ‘current’ is ambiguous. Current over what?

Depends what system you’re analysing. But the dimensional validity of that statement is applicable in numerous circumstances.


1 Amp == the flow of 1/(1.602176634 × 10^−19) elementary charges per second.

The medium used for flow isn't important for that calculation at all. Just as it would be for liters per second.


A cpu second means very little without more context. CPU performance depends a lot on things like cache, branch prediction, out of order execution. Each second represents something fairly distinct from the others.


It’s not ambiguous when the Amazon bill arrives.


> relating request rates (in requests per second) to compute requirements (in CPU seconds per request)

The exist SI unit which specifically applies to queueing problems is the erlang, a unit originally used in telecommunications. Applied to computers, it would translate to CPU use per request.

https://en.wikipedia.org/wiki/Erlang_(unit)

It's considered to be a dimensionless unit (according to wiki), implying that CPUs and requests are also dimensionless.


There are exactly 7 SI units and exactly 22 special names for coherent derived units - Erlang is not one of them.


Personally I like variable names better than symbols anyway.


No way the same org that named the mole a unit discourages the use of counting units.

I think what we are really after is yoctomole Becquerels.


Interestingly, a "conservation of matter" law can exist independently of atoms. I.e. it is mathematically consistent to create a universe in which a "mole" is necessary, but matter is not discrete. Therefore "mole" can be considered a bit more fundamental (in any universe). I find it reasonable to stick to using a "mole" unit on that basis, although I would not be dying on this hill.


The yoctomole is a wonderful unit, for example when you want just slightly more than half a cup of coffee!

But the mole as a "counting unit" is different from OP's idea of assigning units to things like network requests. The mole is just a shorthand for a number, like a dozen or a score. We don't have different kind of "moles" for, say, carbon atoms and water molecules. Or coffee.


> Hertz is for periodic phenomena

> The applicable SI unit therefore is just the reciprocal second, s^(-1).

That's the hertz.


While Hertz are 1/s, there is implications between using frequencies in Hertz and rates in 1/s. Units are not just something to mechanically check, but also for communication with other humans. So connotations matter in addition to denotation.


Hertz, becquerel, et al. are algebraically defined as s^(-1) yet intended to be used for different kinds of quantities. The SI brochure also allows replacing radian by 1, which brings angular velocity into the fight. Further reading: https://doi.org/10.1088/0026-1394/52/1/40


And that brings up the difference between frequency and angular frequency.

When you use hertz meaning ‘cycles per second’ it’s far more natural to associate it with an angular velocity of 2pi radians per second - which throws a bit of a spanner in the dimensionless works, and makes it feel like using 1/2pi as a radian makes more sense.

Score another point for tau I guess.


Not necessarily. As mentioned by others the Hertz is for frequencies of periodic phenomena. While its dimension is indeed s^-1, that says nothing about periodicity.

The Becquerel is also s^-1.


Are you suggesting it is sensible to measure airplane crashes in hertz?

It's not algebraically incorrect, but it contains something dangerously wrong connotations about what kind of data it is.

https://xkcd.com/687/


SI has several cursed units. My favourite of them is the kWh.

A watt is just a joule per second. Making 1 kWh === 3.6 MJ.


In the EU they measure fuel efficiency in liters per 100km, which dimensionally is a unit of area.

In the US we use miles per gallon, which is the inverse - a ‘per area’.


Dimensionally, "liters of gasoline per 100km" and "miles per gallon of gasoline" are already stated in simplest form. Your only hope of demonstrating that a car's fuel efficiency can be measured in "liters per 100km", as opposed to "liters of gasoline per 100km", is to show that the car will function just as efficiently no matter what you put in the fuel tank, that if you put in a liter of sand you can drive just as far as if you put in a liter of gas. Among other problems, if you tried to cancel the linear kilometers of the denominator with one dimension of the liters of gasoline in the numerator, you'd end up with incompatible units being paired together. Gasoline can't be measured in two-dimensional units, and there is no "linear gasoline" in the denominator that would let you transform the gasoline in the numerator anyway.

You see this problem pop up all the time in chemistry, where a mole of some substance and a mole of some other substance are incompatible units. There is no such unit as "mole", only "mole of [whatever]". But there are people who would like to believe that "mole" is a unit.

(In contrast, there is such a unit as "liter", but it isn't used in fuel efficiency ratings.)


Okay, let’s humor this new lGas unit and see if it works.

If my engine consumes 10lGas/100km when traveling at 100km/h, that means it uses 10lGas/h, or .002778 lGas/s.

If the pipe feeding my engine has a cross sectional area of 10^-6m^2, how fast is the gasoline flowing through that pipe?

Naively I would expect I could divide flow rate by area to get mean velocity. But I’m expecting the result to be in m/s. But if I divide .002778 lGas/s by 10^-6m^2 I get 2778lGas/sm^2.

Unless an lGas is 10^-3mGas^3 and I can measure gas area in mGas^2, so I can get my gas speed in mGas/s?

If you want a mathematical way to capture ‘of gasoline’ the right way to think of it is not as a unit dimension but rather as a basis vector, kinda like ‘up’ or ‘across’.

1m * up is the vector quantity ‘1m up’, which has dimension ‘length’. 1m * across is the vector quantity ‘1m across’ which also has dimension length (we call it a displacement, but it’s a vector in the length dimension). We can add them together even though they point in different directions because they share the same dimension. The result is the vector quantity ‘1m up and 1m across’ and it is also a length.

Similarly 1l * of gas is a vector quantity ‘1l of gas’ with dimension ‘volume’. I can add it to ‘1l of air’ to get ‘1l of gas plus 1l of air’ which is still a vector volume. It might describe the contents of my fuel tank when it’s half empty for example.


Second that! (No pun intended.) Dunno how many times I have had to explain to people that the kWh is an amount, not a rate.


Seems like that’d be the default assumption - I pay zero point one bucks per kWh, of course it’s an amount. What’s more interesting is kW/h, it feels like a rate but it’s more like an acceleration.


how does kW/h even work? because W = J/s, making kW/h kJ/s/h.


Like he said, it would measure the rate of change between two kilowatt levels. You might ask questions like "how quickly can this power plant adjust the amount of power it's producing?", and the answer would take the form of an amount of power over an amount of time.

This is one of the most salient ways in which different types of power plants differ; it's something that people are very concerned with.


Would you say that one watt is equal to one joule-hertz?


In exactly the same way that a torque measured in newton-meters can as easily be measured in joules.


Within the area of viscosities reciprocal seconds is an accepted standard unit


Hertz is the SI unit of frequency.


[flagged]


This follows the best practice of submitting a link and posting your opinion in a comment to stand on its own. This way we can all judge which viewpoint we agree with independently.


I would hope we can post and discuss topics we disagree with or think are wrong.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: