🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
15 messages
15 total messages Started by Trevor Fiatal Tue, 13 Jan 1998 00:00
Bet nobody else has *this* problem...
#25174
Author: Trevor Fiatal
Date: Tue, 13 Jan 1998 00:00
36 lines
2091 bytes

OK, so I've given in the innreport hype, and I decide to try it out.  On the
first run, it barfs on the bytecount data ('... bytes 24084') that my
bytecount hack spits out at the end of every 'nnrpd exit' line.

Fine.

Whip out vi, grovel about in the code a bit, figure out where to extend the
existing nnrpd accounting stuff.  No problem.  Re-run test dataset, ~48 hours
worth of data from a busy production server.  Run completes nicely, except
for, oh no, the bytecount data is liberally sprinkled with negative numbers...

Perl won't handle integers greater than 2^21, and several of my lusers have
downloaded over 2GB of news in that 48-hour period.  And these are
*residential* customers.  One of them, from the looks of it, has passed *4GB*
by a few dozen megabytes.

I *really* don't want this to turn into a dicksize war, but has anybody else
ever had reader stats this huge before?  I have the sinking feeling that I'm
in unexplored territory.  And the jungle drums have just started up...

<sigh>
<sigh>
<argh>

-Trevor

--
/--------------------------------=-------------------------------------\
|Trevor Fiatal - trevor@home.net | WANTED: Experienced Usenet and mail |
|Internet Applications Architect | systems admin. Relocation available |
|@Home Network, SF Bay Area, CA  | for right candidate. Email for info.|
\--------------------------------|-------------------------------------/

Re: Bet nobody else has *this* problem...
#25148
Author: Dougal Campbell
Date: Tue, 13 Jan 1998 00:00
26 lines
1601 bytes
Jeremy <jeremy@exit109.com> wrote:
> Trevor Fiatal <trevor@home.net> wrote:

> > Perl won't handle integers greater than 2^21, and several of my
> > lusers have downloaded over 2GB of news in that 48-hour period.  And
> > these are *residential* customers.  One of them, from the looks of
> > it, has passed *4GB* by a few dozen megabytes.

> Lemme guess... someone thinks they've struck the Mother Lode of Porn?

Don't be so judgemental, Jeremy. How do you know he's not a warez
doggie instead of a porn hound? :)

[  I'm soooooo glad I don't carry binaries groups :)  ]

-- 
Dougal Campbell, Systems Manager, ADViCOM        dougal@advicom.net
http://www.advicom.net/                 http://advicom.net/~dougal/
           See my homepage for anti-spam information!
QUOTE OF THE MOMENT:
One, with God, is always a majority, but many a martyr has been burned
at the stake while the votes were being counted.
		-- Thomas B. Reed

Re: Bet nobody else has *this* problem...
#25150
Author: Terry Kennedy
Date: Tue, 13 Jan 1998 00:00
27 lines
2049 bytes
Trevor Fiatal <trevor@home.net> writes:
> Perl won't handle integers greater than 2^21, and several of my lusers have
> downloaded over 2GB of news in that 48-hour period.  And these are
> *residential* customers.  One of them, from the looks of it, has passed *4GB*
> by a few dozen megabytes.

  Add a "use Math::BigInt" and make all of your byte stuff BigInts. The only
problem I've had when using BigInt and BigFloat is that fcmp appears to do
lexical compares of numbers expressed in scientific notation, which is about
the most useless thing I've ever seen (as my comments in diablo-stats.pl show).

> I *really* don't want this to turn into a dicksize war, but has anybody else
> ever had reader stats this huge before?  I have the sinking feeling that I'm
> in unexplored territory.  And the jungle drums have just started up...

  Not for readers, but I've bounced off the speed bumps at 2GB (signed int),
4GB (unsigned int) and 10Gb (a %#d format spec, because it would *never* get
_that_ big). I think the code is now safe up to 99.9GB. I hope to either re-
tire or hire a news flunky and delegate this work by the time that happens...
8-)

	Terry Kennedy		  Operations Manager, Academic Computing
	terry@spcvxa.spc.edu	  St. Peter's College, Jersey City, NJ USA
        +1 201 915 9381 (voice)   +1 201 435-3662 (FAX)

Re: Bet nobody else has *this* problem...
#25156
Author: Piers Cawley
Date: Tue, 13 Jan 1998 00:00
23 lines
1453 bytes
Tue, 13 Jan 1998 12:00:30 GMT trevor@home.net (Trevor Fiatal) news.software.nntp
> OK, so I've given in the innreport hype, and I decide to try it out.

[...] 

> Perl won't handle integers greater than 2^21, and several of my
> lusers have downloaded over 2GB of news in that 48-hour period. And
> these are *residential* customers. One of them, from the looks of
> it, has passed *4GB* by a few dozen megabytes.

Assuming you're using perl 5.004, have a look at Math::BigInt. It's
not completely transparent though, you need to predeclare your
variables as bigints, and output is of the form '+1234'.

-- 
Piers Cawley -- Systems Genie for Aladdin
If a `religion' is defined to be a system of ideas that contains
unprovable statements, then Godel taught us that mathematics is not
only a religion, it is the only religion that can prove itself to be
one. -- John Barrow

Re: Bet nobody else has *this* problem...
#25175
Author: Jeremy
Date: Tue, 13 Jan 1998 00:00
15 lines
1067 bytes
Trevor Fiatal <trevor@home.net> wrote:

> Perl won't handle integers greater than 2^21, and several of my
> lusers have downloaded over 2GB of news in that 48-hour period.  And
> these are *residential* customers.  One of them, from the looks of
> it, has passed *4GB* by a few dozen megabytes.

Lemme guess... someone thinks they've struck the Mother Lode of Porn?

-- 
Jeremy
jeremy@exit109.com

Re: Bet nobody else has *this* problem...
#25179
Author: Jeff Garzik
Date: Tue, 13 Jan 1998 00:00
26 lines
1458 bytes
Hey Trevor,

Trevor Fiatal wrote:
> OK, so I've given in the innreport hype, and I decide to try it out.  On the
> first run, it barfs on the bytecount data ('... bytes 24084') that my
> bytecount hack spits out at the end of every 'nnrpd exit' line.
> [...]

> Perl won't handle integers greater than 2^21, and several of my lusers
> [...]

Perl *does* handle numbers larger than 32 bits.

Iain Lea ran into this when writing diablo-stats, and I pointed him to
the Perl documentation, specifically

	perldoc BigFloat
	perldoc BigInt

-- 
Jeff Garzik			    Typhoon, Cyclone, Diablo, and INN
Spinne USENET News Service	        Fast and efficient news feeds
http://www.spinne.com/usenet/	           News tuning and consulting

Re: Bet nobody else has *this* problem...
#25190
Author: Trevor Fiatal
Date: Wed, 14 Jan 1998 00:00
45 lines
2859 bytes
On Tue, 13 Jan 1998 12:31:42 GMT, Terry Kennedy <terry@spcuna.spc.edu>
spake thusly:

>Trevor Fiatal <trevor@home.net> writes:
>> Perl won't handle integers greater than 2^21, and several of my lusers have
>> downloaded over 2GB of news in that 48-hour period.  And these are
>> *residential* customers.  One of them, from the looks of it, has passed *4GB*
>> by a few dozen megabytes.
>
>  Add a "use Math::BigInt" and make all of your byte stuff BigInts. The only
>problem I've had when using BigInt and BigFloat is that fcmp appears to do
>lexical compares of numbers expressed in scientific notation, which is about
>the most useless thing I've ever seen (as my comments in diablo-stats.pl show).

Yeah, I was afraid someone was going to mention Math::BigInt.  
<whine>But that requires actual *work* to convert someone else's code!</whine>

Seriously, though, I always hesitate before I dive into doing non-portable
mods to somebody else's code -- it inevitably turns into a cycle of new code
release, find mods in old code, hack mods into new code, debug problems,
repeat.  I was actually kind of hoping that somebody already had a version of
innreport hacked up to handle ints >32bits, but doesn't look like it.

Think if I submitted my bytecount extensions and BigInt mods, they'd actually
make it into the code so it would be a one-time project?

>  Not for readers, but I've bounced off the speed bumps at 2GB (signed int),
>4GB (unsigned int) and 10Gb (a %#d format spec, because it would *never* get
>_that_ big). I think the code is now safe up to 99.9GB. I hope to either re-
>tire or hire a news flunky and delegate this work by the time that happens...
>8-)

MMmmm.... vacation....

-Trevor

--
/--------------------------------=-------------------------------------\
|Trevor Fiatal - trevor@home.net | WANTED: Experienced Usenet and mail |
|Internet Applications Architect | systems admin. Relocation available |
|@Home Network, SF Bay Area, CA  | for right candidate. Email for info.|
\--------------------------------|-------------------------------------/

Re: Bet nobody else has *this* problem...
#25193
Author: Matija Grabnar
Date: Wed, 14 Jan 1998 00:00
89 lines
2585 bytes
In article <34bd3a1b.348629872@news.corp.home.net>,
Trevor Fiatal <trevor@home.net> wrote:
>On Tue, 13 Jan 1998 12:31:42 GMT, Terry Kennedy <terry@spcuna.spc.edu>
>spake thusly:
>
>>Trevor Fiatal <trevor@home.net> writes:
>>> Perl won't handle integers greater than 2^21, and several of my lusers have
>>> downloaded over 2GB of news in that 48-hour period.  And these are
>>> *residential* customers.  One of them, from the looks of it, has passed *4GB*
>>> by a few dozen megabytes.
That's weird. Perl uses doubles by default, which means it is accurate
up to 49 bits, which should be enough even for most news applications:

perl -e '$j=1;for $i (0..64) { print "$i $j\n"; $j*=2; }'
0 1
1 2
2 4
3 8
4 16
5 32
6 64
7 128
8 256
9 512
10 1024
11 2048
12 4096
13 8192
14 16384
15 32768
16 65536
17 131072
18 262144
19 524288
20 1048576
21 2097152
22 4194304
23 8388608
24 16777216
25 33554432
26 67108864
27 134217728
28 268435456
29 536870912
30 1073741824
31 2147483648
32 4294967296
33 8589934592
34 17179869184
35 34359738368
36 68719476736
37 137438953472
38 274877906944
39 549755813888
40 1099511627776
41 2199023255552
42 4398046511104
43 8796093022208
44 17592186044416
45 35184372088832
46 70368744177664
47 140737488355328
48 281474976710656
49 562949953421312
50 1.12589990684262e+15
51 2.25179981368525e+15
52 4.5035996273705e+15
53 9.00719925474099e+15
54 1.8014398509482e+16
55 3.6028797018964e+16
56 7.20575940379279e+16
57 1.44115188075856e+17
58 2.88230376151712e+17
59 5.76460752303423e+17
60 1.15292150460685e+18
61 2.30584300921369e+18
62 4.61168601842739e+18
63 9.22337203685478e+18
64 1.84467440737096e+19

Maybe someone said 'use int' or something like that?

-- 
"My name is Not Important. Not to friends. 
    But you can call me mr. Important"  - Not J. Important 
Matija.Grabnar@arnes.si

Re: Bet nobody else has *this* problem...
#25198
Author: rjk
Date: Wed, 14 Jan 1998 00:00
17 lines
1086 bytes
matija@arnes.si (Matija Grabnar) writes:

> That's weird. Perl uses doubles by default, which means it is accurate
> up to 49 bits, which should be enough even for most news applications:
> 
> perl -e '$j=1;for $i (0..64) { print "$i $j\n"; $j*=2; }'
> 0 1
[...]
> 64 1.84467440737096e+19
> 
> Maybe someone said 'use int' or something like that?

I have been bitten by using `printf "%d"' with very large integers in
Perl before...

Re: Bet nobody else has *this* problem...
#25199
Author: Ian Stirling
Date: Wed, 14 Jan 1998 00:00
23 lines
2154 bytes
Trevor Fiatal <trevor@home.net> wrote:
: On Tue, 13 Jan 1998 12:31:42 GMT, Terry Kennedy <terry@spcuna.spc.edu>
: spake thusly:

:>Trevor Fiatal <trevor@home.net> writes:
:>> Perl won't handle integers greater than 2^21, and several of my lusers have
:>> downloaded over 2GB of news in that 48-hour period.  And these are
<snip>
: Yeah, I was afraid someone was going to mention Math::BigInt.  
: <whine>But that requires actual *work* to convert someone else's code!</whine>

Do you need actual bytecounts?
If not, just stick a /1024 in there, and change all the K's to M's, etc.

-- 
Ian Stirling.   Designing a linux PDA, see  http://www.mauve.demon.co.uk/
----- ******* If replying by email, check notices in header ******* -----
Prosperity and ruin issue from the power of the tongue.
Therefore, guard yourself against thoughtless speech.


Re: Bet nobody else has *this* problem...
#25220
Author: Trevor Fiatal
Date: Wed, 14 Jan 1998 00:00
33 lines
1990 bytes
On 13 Jan 1998 16:16:07 GMT, Dougal Campbell <dougal@vespucci.advicom.net>
spake thusly:

>Jeremy <jeremy@exit109.com> wrote:
>
>> Lemme guess... someone thinks they've struck the Mother Lode of Porn?

Pretty much.  That .mp3 group also works pretty well when you can suck down
and decode an entire day's worth of new articles in the background while
point-n-drool in your web browser.  Mostly porn, though.

>Don't be so judgemental, Jeremy. How do you know he's not a warez
>doggie instead of a porn hound? :)

'Cause we don't carry warez, thank Bob.  Let them skulk the sewers of IRC
looking for their warez fix, because my news servers work quite hard enough
already without having to deal with that crap.

>[  I'm soooooo glad I don't carry binaries groups :)  ]

Oh, I could only dream. <g>

-T.

--
/--------------------------------=-------------------------------------\
|Trevor Fiatal - trevor@home.net | WANTED: Experienced Usenet and mail |
|Internet Applications Architect | systems admin. Relocation available |
|@Home Network, SF Bay Area, CA  | for right candidate. Email for info.|
\--------------------------------|-------------------------------------/

Re: Bet nobody else has *this* problem...
#25227
Author: Joe Greco
Date: Wed, 14 Jan 1998 00:00
20 lines
1582 bytes
In news.software.nntp article <34bc54cf.289908102@news.corp.home.net>, trevor@home.net (Trevor Fiatal) wrote:
:Perl won't handle integers greater than 2^21, and several of my lusers have
:downloaded over 2GB of news in that 48-hour period.  And these are
:*residential* customers.  One of them, from the looks of it, has passed *4GB*
:by a few dozen megabytes.
:
:I *really* don't want this to turn into a dicksize war, but has anybody else
:ever had reader stats this huge before?  I have the sinking feeling that I'm
:in unexplored territory.  And the jungle drums have just started up...

Geez, I thought you guys were bigtime.  I ran into this way back when
people first started uuencoding CDROM's and posting them.  I ran into
problems with total nnrp reader traffic even before that.

My solution: don't care about the stats.  :-)

... JG

Re: Bet nobody else has *this* problem...
#25266
Author: Timothy Miller
Date: Wed, 14 Jan 1998 00:00
19 lines
1164 bytes
trevor@home.net (Trevor Fiatal) writes:

> 'Cause we don't carry warez, thank Bob.  Let them skulk the sewers of IRC
> looking for their warez fix, because my news servers work quite hard enough
> already without having to deal with that crap.

	Lucky you.

	FWIW, cleanfeed $block_binaries precipitated some actual
compliments this time around.  Someone thanked me for "helping to save
USENET." 

	I'm not sure what to make of it.  8)

-- 
Cerebus <tmill06@ibm.net>

Re: Bet nobody else has *this* problem...
#25252
Author: bill davidsen
Date: Thu, 15 Jan 1998 00:00
45 lines
2124 bytes
In article <wwvbtxedeia.fsf@sfere.greenend.org.uk>,
 <rjk@greenend.org.uk> wrote:
| matija@arnes.si (Matija Grabnar) writes:
| 
| > That's weird. Perl uses doubles by default, which means it is accurate
| > up to 49 bits, which should be enough even for most news applications:
| > 
| > perl -e '$j=1;for $i (0..64) { print "$i $j\n"; $j*=2; }'
| > 0 1
| [...]
| > 64 1.84467440737096e+19
| > 
| > Maybe someone said 'use int' or something like that?
| 
| I have been bitten by using `printf "%d"' with very large integers in
| Perl before...

The book says it used dp float, and obviously if you convert to int
you lose something (ie. print with %d). Try %.0f for this stuff.
Your little test program seems to work okay using that.

Ex:
 perl -e '$j=1;for $i (0..64) { printf "%d %.0f\n", $i, $j; $j*=2; }'

I would rather scale: (flames about source code to /dev/null)
================
# scale values

@suffix = (" ", "K", "M", "G", "T");
$val = $ARGV[0];
print "Val: $val  ";

for ($i = 0; $val >= 1000; ) { ++$i; $val /= 1024 }
printf "%5.1f%s\n", $val, $suffix[$i];
================

my general purpose print an unknown value route.
--
bill davidsen (davidsen@tmr.com)
  "The action you see on fishing programs is something like the women
in _Playboy_. Not actually *fake*, but not remotely typical of the
average person's experience."  -me

Re: Bet nobody else has *this* problem...
#25275
Author: Trevor Fiatal
Date: Thu, 15 Jan 1998 00:00
35 lines
2004 bytes
On 14 Jan 1998 11:57:58 -0600, jgreco@ns.sol.net (Joe Greco)
spake thusly:

>Geez, I thought you guys were bigtime. 

Ow!  Man, that stung.  :)

> I ran into this way back when
>people first started uuencoding CDROM's and posting them.  I ran into
>problems with total nnrp reader traffic even before that.

Ah, but I have a rebuttal -- it would have hit us long ago, but we were using
tried-and-true innlog.pl instead of this newfangled innreport stuff which
doesn't understand big numbers.

>My solution: don't care about the stats.  :-)

Well, I'd agree with that one, except I need the bytecount numbers to predict
I/O loads at X, Y, and Z users, where [XYZ] are very large numbers.  We also
frown on lusers who suck 2+GB/day of news from our boxen, as it usually means
they're using a sucker.

But hey, I love my job, and that makes it all OK.

-Trevor

--
/--------------------------------=-------------------------------------\
|Trevor Fiatal - trevor@home.net | WANTED: Experienced Usenet and mail |
|Internet Applications Architect | systems admin. Relocation available |
|@Home Network, SF Bay Area, CA  | for right candidate. Email for info.|
\--------------------------------|-------------------------------------/

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