Thread View: news.software.nntp
10 messages
10 total messages
Started by John F. Morse
Sun, 27 Mar 2011 17:53
The Numbers Game
Author: John F. Morse
Date: Sun, 27 Mar 2011 17:53
Date: Sun, 27 Mar 2011 17:53
45 lines
2860 bytes
2860 bytes
I've monitored the Daily Report CNFS buffer status for a few weeks. The numbers don't seem to jive. For instance, here is a line that shows a 0.6% error in the %Used column: CNFS buffer status: Buffer Class Size Used %Used Cycles KB/sec Days fstbn01 fastbins 2.0 GB 1010.9 MB 49.4% 1 0.17 142.35 If the cycbuff is 2.0 GB in size, then if it is 1010.9 MB full, it should show 50.5 %Used. I suspect you could say that when it gets 1024.0 MB full, then it will be 50.0 %Used. But that 1.1% low "error" is reversed in the following line: junk03 junk 2.0 GB 1.0 GB 51.8% 0 1.97 12.30 Here the 51.8% error is 1.8% too much. Just what algorithm is used to determine the percent (%Used), and what method of units is used for representing Megabytes and Gigabytes (MB vs MiB and/or GB vs GiB)? http://en.wikipedia.org/wiki/MiB Just for comparison, below is the "cnfsstat -a" for the two cycbuffs, which was taken about 12:45 later than the Daily Report produced at midnight: news@v102:~$ cnfsstat -a . . . Class fastbins for groups matching "*.bina*,!local.binaries" Buffer fstbn01, size: 2.00 GBytes, position: 1011 MBytes 1.49 cycles Newest: 2011-03-27 12:40:29, 0 days, 0:01:44 ago Oldest: 2011-01-13 11:17:11, 73 days, 0:25:02 ago . . . Class junk for groups matching "junk" . . . Buffer junk03, size: 2.00 GBytes, position: 1.06 GBytes 0.53 cycles Newest: 2011-03-27 12:35:40, 0 days, 0:06:33 ago Oldest: 2011-03-08 8:35:29, 19 days, 3:06:44 ago -- John When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Re: The Numbers Game
Author: Julien ÉLIE
Date: Sun, 27 Mar 2011 20:42
Date: Sun, 27 Mar 2011 20:42
88 lines
3376 bytes
3376 bytes
Hi John, > CNFS buffer status: > Buffer Class Size Used %Used Cycles KB/sec Days > fstbn01 fastbins 2.0 GB 1010.9 MB 49.4% 1 0.17 142.35 > > If the cycbuff is 2.0 GB in size, then if it is 1010.9 MB full, it > should show 50.5 %Used. No. Be careful you are not dividing with the same unit. 1 GB = 1024 MB 1010.9/(2.0 * 1024) = 0.4936 Which is 49.4%. > I suspect you could say that when it gets 1024.0 MB full, then it will > be 50.0 %Used. Actually, the size is not the size of the total buffer, but the size of the body of the buffer (where the articles can be written, after the header). So if your buffer is exactly 2 GB, the real size is a bit inferior. 1010,9 MB <-> 49.4 % x <-> 50 % x = 1023.2 MB but of course, with rounding in percentages and sizes, x is not exactly 1023.2 MB. At least, x < 1024 MB. > But that 1.1% low "error" is reversed in the following line: > > junk03 junk 2.0 GB 1.0 GB 51.8% 0 1.97 12.30 > > Here the 51.8% error is 1.8% too much. Here, we have GB for both of these values. As the previous computed x may be 1023 MB, the size may be: (2 x 1023)/1024 = 1.998 GB With the round-to-even Perl method, 1.0 GB is up to 1.050 GB and then: 1.050/1.998 = 0.526 1.030/1.998 = 0.516 I am therefore not surprised to read 51.8%. > Just what algorithm is used to determine the percent (%Used) Used/Size. And please do not forget that the computation is done on the "real" (un-rounded) values. It is not done on the already rounded values. > and what > method of units is used for representing Megabytes and Gigabytes (MB vs > MiB and/or GB vs GiB)? These are real GB (with the 1024 factor) in innreport. > Buffer fstbn01, size: 2.00 GBytes, position: 1011 MBytes 1.49 cycles Length of the writable area: between 1.995 GB and 2.005 GB. 1011/(1.995*1024) = 0.495 1011/(2.005*1024) = 0.492 It corresponds to the 49% of the current cycle. > Buffer junk03, size: 2.00 GBytes, position: 1.06 GBytes 0.53 cycles 1.06/2.00 = 0.53 This one was easy :) -- Julien ÉLIE « Vinum nouum, amicus nouus : uesterascet, et cum suauitate bibes illud. »
Re: The Numbers Game
Author: John F. Morse
Date: Mon, 28 Mar 2011 03:04
Date: Mon, 28 Mar 2011 03:04
151 lines
5665 bytes
5665 bytes
Hi Julien, >> CNFS buffer status: >> Buffer Class Size Used %Used Cycles KB/sec Days >> fstbn01 fastbins 2.0 GB 1010.9 MB 49.4% 1 0.17 142.35 >> >> If the cycbuff is 2.0 GB in size, then if it is 1010.9 MB full, it >> should show 50.5 %Used. > > No. Be careful you are not dividing with the same unit. > 1 GB = 1024 MB > > 1010.9/(2.0 * 1024) = 0.4936 > Which is 49.4%. Not knowing the unit was MiB, I had used 1010.9/2000. Which was my next guess shown below. ;-) >> I suspect you could say that when it gets 1024.0 MB full, then it will >> be 50.0 %Used. > > Actually, the size is not the size of the total buffer, but the size > of the body of the buffer (where the articles can be written, after > the header). > So if your buffer is exactly 2 GB, the real size is a bit inferior. > > 1010,9 MB <-> 49.4 % > x <-> 50 % > > x = 1023.2 MB > but of course, with rounding in percentages and sizes, x is not > exactly 1023.2 MB. At least, x < 1024 MB. ls -l shows: -rw-r--r-- 1 news news 2147482624 Mar 27 17:24 fstbn01 The 2 GB cycbuffs are 2147482624, which I determined to be the maximum I could create. dd if=/dev/zero of=/var/spool/news/cycbuffs/fstbn01 bs=1k count=2097151 2097151 = 0x20000-1 >> But that 1.1% low "error" is reversed in the following line: >> >> junk03 junk 2.0 GB 1.0 GB 51.8% 0 1.97 12.30 >> >> Here the 51.8% error is 1.8% too much. > > Here, we have GB for both of these values. > As the previous computed x may be 1023 MB, the size may be: > (2 x 1023)/1024 = 1.998 GB > > With the round-to-even Perl method, 1.0 GB is up to 1.050 GB and then: > 1.050/1.998 = 0.526 > 1.030/1.998 = 0.516 > > I am therefore not surprised to read 51.8%. OK. So Perl does some rounding. >> Just what algorithm is used to determine the percent (%Used) > > Used/Size. > > And please do not forget that the computation is done on the "real" > (un-rounded) values. It is not done on the already rounded values. Computation is on binary digits, while the Daily Report is generated in Perl, therefore some rounding error will exist? >> and what >> method of units is used for representing Megabytes and Gigabytes (MB vs >> MiB and/or GB vs GiB)? > > These are real GB (with the 1024 factor) in innreport. The GiB units and not the GB. Thanks for the verification. >> Buffer fstbn01, size: 2.00 GBytes, position: 1011 MBytes 1.49 cycles > > Length of the writable area: between 1.995 GB and 2.005 GB. > 1011/(1.995*1024) = 0.495 > 1011/(2.005*1024) = 0.492 > It corresponds to the 49% of the current cycle. > >> Buffer junk03, size: 2.00 GBytes, position: 1.06 GBytes 0.53 cycles > > 1.06/2.00 = 0.53 > This one was easy :) Yes, and thanks for verifying that the IEC definitions were used instead of SI definitions. I've noticed another oddity in the Daily Reports. If you have time, could you describe what "Days" means and how "Days" is computed? From two Daily Reports, the first one for March 25, and the second a day later for March 26, they illustrate a wide disagreement on the "Days" data: CNFS buffer status: Buffer Class Size Used %Used Cycles KB/sec Days fstbn01 fastbins 2.0 GB 1010.1 MB 49.3% 1 0.12 196.69 CNFS buffer status: Buffer Class Size Used %Used Cycles KB/sec Days fstbn01 fastbins 2.0 GB 1010.9 MB 49.4% 1 0.17 142.35 Now compare these two with the cnfsstat output showing the oldest article was accepted (injected) 86 days ago: Class fastbins for groups matching "*.bina*,!local.binaries" Buffer fstbn01, size: 2.00 GBytes, position: 1011 MBytes 1.49 cycles Newest: 2011-03-27 17:24:53, 0 days, 4:08:48 ago Oldest: 2010-12-31 14:24:50, 86 days, 6:08:51 ago Additionally cnfsheadconf -c fstbn01 shows: Buffer fstbn01, len: 2048.00 Mbytes, used: 1011.03 Mbytes (49.4%) 1 cycles Meta , order: 0, current: TRUE, blocksize: 4096 Newest: 2011-03-27 17:24:53, 0 days, 4:26:23 ago It is the only cycbuff in the metacycbuff. Three different values are shown. Any idea why? Thanks Julien. -- John When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Re: The Numbers Game
Author: Julien ÉLIE
Date: Mon, 28 Mar 2011 19:59
Date: Mon, 28 Mar 2011 19:59
44 lines
2601 bytes
2601 bytes
Hi John, > Not knowing the unit was MiB Yes, you're right; it is what is called nowadays MiB. >> And please do not forget that the computation is done on the "real" >> (un-rounded) values. It is not done on the already rounded values. > > Computation is on binary digits, while the Daily Report is generated in > Perl, therefore some rounding error will exist? The language does not matter here. I was saying that if x = 1001 and y = 1002, then these values are kept. Rounded, x is 1.0 and y is 1.0, which are the values appearing in the report. But for subsequent computations, for instance x/y, 1001 and 1002 are used, and not 1.0. > If you have time, could you describe what "Days" means and how "Days" is > computed? > > CNFS buffer status: > Buffer Class Size Used %Used Cycles KB/sec Days > fstbn01 fastbins 2.0 GB 1010.1 MB 49.3% 1 0.12 196.69 > > CNFS buffer status: > Buffer Class Size Used %Used Cycles KB/sec Days > fstbn01 fastbins 2.0 GB 1010.9 MB 49.4% 1 0.17 142.35 Days = (Size in KiB) / (86400 x Rate) 2.0 * 1024 * 1024 / (86400 * 0.12) 2.0 * 1024 * 1024 / (86400 * 0.17) It is the number of days it will take to fill the whole buffer *if* its filling rate over time is the one of the day of the report. -- Julien ÉLIE « Vinum nouum, amicus nouus : uesterascet, et cum suauitate bibes illud. »
Re: The Numbers Game
Author: D. Stussy
Date: Mon, 28 Mar 2011 23:03
Date: Mon, 28 Mar 2011 23:03
16 lines
1688 bytes
1688 bytes
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message news:8vc7l2FiglU1@mid.individual.net... > Hi John, > > > Not knowing the unit was MiB > > Yes, you're right; it is what is called nowadays MiB. That depends on whom you ask. If you ask an engineer, you get that crap. If you ask a computer scientist, you get MB, because we don't recognize the IEEE's crapola.
Re: The Numbers Game
Author: Russ Allbery
Date: Mon, 28 Mar 2011 23:38
Date: Mon, 28 Mar 2011 23:38
19 lines
2011 bytes
2011 bytes
"D. Stussy" <spam+newsgroups@bde-arc.ampr.org> writes:
> If you ask a computer scientist, you get MB, because we don't recognize
> the IEEE's crapola.
These days, I use MiB because I agree with the IEEE's reasoning.
Ambiguous standards are just silly, and the ISO definition of the unit
scaling factors was there long before computers. It wasn't a good idea to
redefine them to mean 1024 in the first place, and it's good to go back
and fix it.
I'm not sure how you determine who's a computer scientist. I have a
master's degree in CS from Stanford, if that counts. :)
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: The Numbers Game
Author: John F. Morse
Date: Tue, 29 Mar 2011 01:49
Date: Tue, 29 Mar 2011 01:49
34 lines
2166 bytes
2166 bytes
D. Stussy wrote: > "Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message > news:8vc7l2FiglU1@mid.individual.net... > >> Hi John, >> >> >>> Not knowing the unit was MiB >>> >> Yes, you're right; it is what is called nowadays MiB. >> > > That depends on whom you ask. > > If you ask an engineer, you get that crap. > > If you ask a computer scientist, you get MB, because we don't recognize the > IEEE's crapola. > IEEE? Try IEC. ;-) http://en.wikipedia.org/wiki/International_Electrotechnical_Commission http://en.wikipedia.org/wiki/MiB -- John When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Re: The Numbers Game
Author: John F. Morse
Date: Tue, 29 Mar 2011 02:03
Date: Tue, 29 Mar 2011 02:03
23 lines
2012 bytes
2012 bytes
Hi Julien. > Days = (Size in KiB) / (86400 x Rate) > > 2.0 * 1024 * 1024 / (86400 * 0.12) > 2.0 * 1024 * 1024 / (86400 * 0.17) > > It is the number of days it will take to fill the whole buffer *if* > its filling rate over time is the one of the day of the report. I see -- the "rate." Somehow I was thinking it had to do with the age of the oldest article and the percentage of fill for that cycbuff. Those are known items, but the rate is a only a guesstimate as you point out. ;-) Thanks for explaining it. -- John When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Re: The Numbers Game
Author: D. Stussy
Date: Tue, 29 Mar 2011 19:32
Date: Tue, 29 Mar 2011 19:32
31 lines
2670 bytes
2670 bytes
"Russ Allbery" <rra@stanford.edu> wrote in message news:87lizyke7x.fsf@windlord.stanford.edu... > "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> writes: > > > If you ask a computer scientist, you get MB, because we don't recognize > > the IEEE's crapola. > > These days, I use MiB because I agree with the IEEE's reasoning. > Ambiguous standards are just silly, and the ISO definition of the unit > scaling factors was there long before computers. It wasn't a good idea to > redefine them to mean 1024 in the first place, and it's good to go back > and fix it. > > I'm not sure how you determine who's a computer scientist. I have a > master's degree in CS from Stanford, if that counts. :) ...And my master's degree (in CS) is from CSU Fullerton. In my opinion, it was never ambiguous. 50 years of computer science history and usage has had the metric prefixes always being multiples of 2^10 (1,024) instead of 1,000 (or 10^3), and that was too much for the dumb-ass engineers at the IEEE to handle. Had this been accepted into the scientific community, ACM and other similar organizations would have agreed to sign onto this; they never did. With everyone I know personally, ask them how many bytes are in one megabyte, and they will tell you 1,048,576. None of them would ever respond with 1,000,000.
Re: The Numbers Game
Author: Russ Allbery
Date: Tue, 29 Mar 2011 20:04
Date: Tue, 29 Mar 2011 20:04
31 lines
2950 bytes
2950 bytes
"D. Stussy" <spam+newsgroups@bde-arc.ampr.org> writes:
> With everyone I know personally, ask them how many bytes are in one
> megabyte, and they will tell you 1,048,576. None of them would ever
> respond with 1,000,000.
Unless they work for a storage manufacturer, where drives have been quoted
with 1,000,000 bytes to a MB for quite some time. The usage of the
prefixes was inconsistent even within the computer field.
But beyond that, one of the *major* uses of computing is for science and
scientific research, and with current HPC requirements, network bandwidth
and storage sizes and whatnot are things that scientists have to work with
and think about a lot. And the whole point in having standardized units
that are used for everything scientific is that you don't have to waste
brain cells on pointless conversions. Citing values in GiB as GB to
scientists expecting GB to mean what G in front of anything else would
mean is just confusing.
One of the main reasons why this has historically not been an issue is
that if you're working with small quantities (K and M), the error is small
(2.4% for K, 4.9% for M). But increasingly larger sizes are used, and the
error keeps growing. For GB, which is universal now, the error is 7.4%.
For TB, which is becoming universal, the error is 10%. That's
significant. And it keeps getting worse.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads