🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
12 messages
12 total messages Started by Karl Denninger Thu, 18 Nov 1993 03:09
TIN - outrageous memory pig?!
#6559
Author: Karl Denninger
Date: Thu, 18 Nov 1993 03:09
19 lines
1412 bytes
What's uh the deal here?

  PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
 8330 roblinx    3    0  6512K  748K sleep   0:18  5.03%  5.03% tin
 8157 annecost   3    0  6628K 1380K sleep   0:09  3.13%  3.12% tin
 8395 karl      10    0  1712K 1100K sleep   0:00  0.52%  0.49% trn

THREE times the size of trn?  The text sizes are comparable -- this is all
dynamically allocated data!

Needless to say, this beats the hell out of the VM system on the machine!

Is there anything which can be done about this hog other than adding RAM 
to all the machines that run it?

--
Karl Denninger (karl@MCS.COM) 	| MCSNet - First Interactive Internet and 
Modem: [+1 312 248-0900]	| Clarinet feed in Chicago.  Send email to
Voice/FAX: [+1 312 248-8649]	| "info@mcs.com" for more information.
Re: TIN - outrageous memory pig?!
#6579
Author: Fokke de Boer
Date: Fri, 19 Nov 1993 09:31
25 lines
1644 bytes
Karl Denninger (karl@Notwerk.mcs.com) wrote:
: What's uh the deal here?

:   PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
:  8330 roblinx    3    0  6512K  748K sleep   0:18  5.03%  5.03% tin
:  8157 annecost   3    0  6628K 1380K sleep   0:09  3.13%  3.12% tin
:  8395 karl      10    0  1712K 1100K sleep   0:00  0.52%  0.49% trn

: THREE times the size of trn?  The text sizes are comparable -- this is all
: dynamically allocated data!

That has to do with the way you compiled it, or something. I run tin here
with SNTP on HP-UX, and I get something like this:

PID USERNAME  PRI   NI  SIZE  RES  STATE   TIME   %WCPU  %CPU  COMMAND
26546 mtvfb   156   20   968K  864K  sleep   0:07   0.09   0.06 tin -U

Looks much better!

--
I am:   Fokke de Boer
EMAIL	mtvfb@rivm.nl
SNAIL	RIVM, dep. MTV, PO Box 1, 3720 BA Bilthoven, The Netherlands
PHONE	(..31) 30 743530 
FAX		(..31) 30 250740
Re: TIN - outrageous memory pig?!
#6585
Author: Kent Mitchell
Date: Fri, 19 Nov 1993 22:53
16 lines
1332 bytes
Karl Denninger (karl@Notwerk.mcs.com) wrote:
: What's uh the deal here?

:   PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
:  8330 roblinx    3    0  6512K  748K sleep   0:18  5.03%  5.03% tin
:  8157 annecost   3    0  6628K 1380K sleep   0:09  3.13%  3.12% tin
:  8395 karl      10    0  1712K 1100K sleep   0:00  0.52%  0.49% trn

: THREE times the size of trn?  The text sizes are comparable -- this is all
: dynamically allocated data!

Funny - when I run this same kind of test I get the numbers for mem
consumption that are actually less that those you get for trn.  Not sure
what's up but it is a data point.

Kent Mitchell
Re: TIN - outrageous memory pig?!
#6600
Author: Toivo Pedaste
Date: Mon, 22 Nov 1993 02:18
20 lines
1677 bytes
kdm@Rational.COM (Kent Mitchell) writes:

>Karl Denninger (karl@Notwerk.mcs.com) wrote:
>: What's uh the deal here?

>:   PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
>:  8330 roblinx    3    0  6512K  748K sleep   0:18  5.03%  5.03% tin
>:  8157 annecost   3    0  6628K 1380K sleep   0:09  3.13%  3.12% tin
>:  8395 karl      10    0  1712K 1100K sleep   0:00  0.52%  0.49% trn

>: THREE times the size of trn?  The text sizes are comparable -- this is all
>: dynamically allocated data!

Tim seems to use the excessive amount of memory if there are new groups, if
there aren't any then the memory usage is what you would expect.
--
------------------------------------------------------------------
 Toivo Pedaste                        Email:  toivo@ucs.uwa.edu.au
 University Computing Services,       Phone:  +61 9 380 2605
 University of Western Australia      Fax:    +61 9 380 1014
Re: TIN - outrageous memory pig?!
#6614
Author: Sean Casey
Date: Mon, 22 Nov 1993 22:58
19 lines
1733 bytes
I get the same thing. Either tin hovers around 700-1000k, or it stays
around 7000k. Three or four like that and our Pyramid falls on its
face.

-Sean

  PID TTY  STAT  TIME SL RE PAGEIN SIZE  RSS  LIM TSIZ TRS %CPU %MEM COMMAND
26143 sd   P     0:07  0 99      6 1058  636   xx    0   0  0.0  1.4 tin
26826 132  S     0:04  4 99      0  772  630   xx    0   0  1.1  1.4 tin
27378 142  P     0:05  1 99     15  712  576   xx    0   0  1.0  1.3 tin
19213 028  S     0:10 19 99     27  758  552   xx    0   0  0.2  1.2 tin
26813 s4   S     0:04  4 99     79  746  366   xx    0   0  0.3  0.8 tin
 7312 pd   S     0:05 11 99     74 6896  130   xx    0   0  0.2  0.3 tin
24103 170  I     0:05 99 99    323  752   78   xx    0   0  0.0  0.2 tin
19952 p6   I     0:01 99 99    316  744   28   xx    0   0  0.0  0.1 tin
-- 
Sean Casey
Lead Systems Analyst
LOGDIS SM-ALC/SCCB (RCF)
Re: TIN - outrageous memory pig?!
#6615
Author: Kent Mitchell
Date: Tue, 23 Nov 1993 02:17
16 lines
1498 bytes
Toivo Pedaste (toivo@ucs.uwa.OZ.AU) wrote:
: >:   PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
: >:  8330 roblinx    3    0  6512K  748K sleep   0:18  5.03%  5.03% tin
: >:  8157 annecost   3    0  6628K 1380K sleep   0:09  3.13%  3.12% tin
: >:  8395 karl      10    0  1712K 1100K sleep   0:00  0.52%  0.49% trn

: >: THREE times the size of trn?  The text sizes are comparable -- this is all
: >: dynamically allocated data!

: Tim seems to use the excessive amount of memory if there are new groups, if
: there aren't any then the memory usage is what you would expect.

Umm ... I get new group here every time I start tin (gotta love those alt
group hierarchies) an I still don't see this.  But maybe Ian would comment.

Kent
Re: TIN - outrageous memory pig?!
#6632
Author: Marshal H. Perlman
Date: Tue, 23 Nov 1993 20:38
25 lines
2095 bytes
On Tue, 23 Nov 1993 02:17:15 GMT, Kent Mitchell (kdm@Rational.COM) wrote:
: Toivo Pedaste (toivo@ucs.uwa.OZ.AU) wrote:
: : >:   PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
: : >:  8330 roblinx    3    0  6512K  748K sleep   0:18  5.03%  5.03% tin
: : >:  8157 annecost   3    0  6628K 1380K sleep   0:09  3.13%  3.12% tin
: : >:  8395 karl      10    0  1712K 1100K sleep   0:00  0.52%  0.49% trn

: : >: THREE times the size of trn?  The text sizes are comparable -- this is all
: : >: dynamically allocated data!

: : Tim seems to use the excessive amount of memory if there are new groups, if
: : there aren't any then the memory usage is what you would expect.

: Umm ... I get new group here every time I start tin (gotta love those alt
: group hierarchies) an I still don't see this.  But maybe Ian would comment.

: Kent

Remember to strip unwanted groups out of your NEWSRC... unlike TRN...you
totally delete unwanted groups (as opposed to commenting them out)
-- 
  |o| Marshal Perlman                       Internet: perlman@cs.fit.edu |o|
  |o| Florida Institute of Technology (ARCS Dept.)           IRC: Squawk |o|
  |o| Melbourne, Florida                             Private Pilot, ASEL |o|
  |o| 407-676-4331                            Goodyear Blimp Club Member |o|
Re: TIN - outrageous memory pig?!
#6646
Author: Herman ten Brugge
Date: Wed, 24 Nov 1993 18:30
27 lines
1905 bytes
Karl Denninger (karl@Notwerk.mcs.com) wrote:
: What's uh the deal here?

:   PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
:  8330 roblinx    3    0  6512K  748K sleep   0:18  5.03%  5.03% tin
:  8157 annecost   3    0  6628K 1380K sleep   0:09  3.13%  3.12% tin
:  8395 karl      10    0  1712K 1100K sleep   0:00  0.52%  0.49% trn

: THREE times the size of trn?  The text sizes are comparable -- this is all
: dynamically allocated data!

: Needless to say, this beats the hell out of the VM system on the machine!

: Is there anything which can be done about this hog other than adding RAM 
: to all the machines that run it?

The reason this happens is probebly that you don't run 'updatemin' or
'upact' to update the min fields in the active file. Tin is keeping a
bitmap in memory for every article in the spool directory for handling
Xref-articles. If you don't update the minimum value of the active file
the bitmap array becomes very large and will have the above effect.

-- 
------------------------------------------------------------------------
Herman ten Brugge			Email:	herman@htbrug.hobby.nl
F. Zernikestraat 207			Phone:  +31-74-913621
7553 EC Hengelo, Nederland
Re: TIN - outrageous memory pig?!
#6660
Author: Karl Denninger
Date: Fri, 26 Nov 1993 00:31
30 lines
2077 bytes
In article <1993Nov24.183058.773@htbrug.hobby.nl>,
Herman ten Brugge <herman@htbrug.hobby.nl> wrote:
>Karl Denninger (karl@Notwerk.mcs.com) wrote:
>: What's uh the deal here?
>
>:   PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
>:  8330 roblinx    3    0  6512K  748K sleep   0:18  5.03%  5.03% tin
>:  8157 annecost   3    0  6628K 1380K sleep   0:09  3.13%  3.12% tin
>:  8395 karl      10    0  1712K 1100K sleep   0:00  0.52%  0.49% trn
>
>: THREE times the size of trn?  The text sizes are comparable -- this is all
>: dynamically allocated data!
>
>: Needless to say, this beats the hell out of the VM system on the machine!
>
>: Is there anything which can be done about this hog other than adding RAM 
>: to all the machines that run it?
>
>The reason this happens is probebly that you don't run 'updatemin' or
>'upact' to update the min fields in the active file. Tin is keeping a
>bitmap in memory for every article in the spool directory for handling
>Xref-articles. If you don't update the minimum value of the active file
>the bitmap array becomes very large and will have the above effect.

Damn unlikely.  I'm running INN 1.4.

--
Karl Denninger (karl@MCS.COM) 	| MCSNet - First Interactive Internet and 
Modem: [+1 312 248-0900]	| Clarinet feed in Chicago.  Send email to
Voice/FAX: [+1 312 248-8649]	| "info@mcs.com" for more information.
Re: TIN - outrageous memory pig?!
#6670
Author: Marc G. Fournier
Date: Fri, 26 Nov 1993 17:48
36 lines
2529 bytes
herman@htbrug.hobby.nl (Herman ten Brugge) writes:

>Karl Denninger (karl@Notwerk.mcs.com) wrote:
>: What's uh the deal here?

>:   PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
>:  8330 roblinx    3    0  6512K  748K sleep   0:18  5.03%  5.03% tin
>:  8157 annecost   3    0  6628K 1380K sleep   0:09  3.13%  3.12% tin
>:  8395 karl      10    0  1712K 1100K sleep   0:00  0.52%  0.49% trn

>: THREE times the size of trn?  The text sizes are comparable -- this is all
>: dynamically allocated data!

>: Needless to say, this beats the hell out of the VM system on the machine!

>: Is there anything which can be done about this hog other than adding RAM 
>: to all the machines that run it?

>The reason this happens is probebly that you don't run 'updatemin' or
>'upact' to update the min fields in the active file. Tin is keeping a
>bitmap in memory for every article in the spool directory for handling
>Xref-articles. If you don't update the minimum value of the active file
>the bitmap array becomes very large and will have the above effect.

	Theory is good, but ours hit 11Meg usage before we effectively
banned the users from using it.  Our active file is automatically updated
by the expire functions in INN1.4 every night, and anytime you restart
the system.  Our active file is over 7000 newsgroups long right now, but
like above, trn used virtually no memory in comparison.

Marc
-- 
Marc G. Fournier  | Internex Online: Toronto's First Public Internet Connection
Etobicoke, Canada | Data: 363-3783        Telnet: io.org        Voice: 363-8676
                  | Worldwide Chat Through IRC      Over 7000 Usenet Newsgroups
scrappy@io.org    | Limited Free Access   Telnet   Ftp   Gopher    Online Games
Re: TIN - outrageous memory pig?!
#6799
Author: Bruce Sterling Woodcock
Date: Sun, 05 Dec 1993 08:38
60 lines
4041 bytes
In article <1993Nov24.183058.773@htbrug.hobby.nl> herman@htbrug.hobby.nl (Herman ten Brugge) writes:
>Karl Denninger (karl@Notwerk.mcs.com) wrote:
>: What's uh the deal here?
>
>:   PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
>:  8330 roblinx    3    0  6512K  748K sleep   0:18  5.03%  5.03% tin
>:  8157 annecost   3    0  6628K 1380K sleep   0:09  3.13%  3.12% tin
>:  8395 karl      10    0  1712K 1100K sleep   0:00  0.52%  0.49% trn
>
>: THREE times the size of trn?  The text sizes are comparable -- this is all
>: dynamically allocated data!
>
>: Needless to say, this beats the hell out of the VM system on the machine!
>
>: Is there anything which can be done about this hog other than adding RAM 
>: to all the machines that run it?
>
>The reason this happens is probebly that you don't run 'updatemin' or
>'upact' to update the min fields in the active file. Tin is keeping a
>bitmap in memory for every article in the spool directory for handling
>Xref-articles. If you don't update the minimum value of the active file
>the bitmap array becomes very large and will have the above effect.

No, I've been looking into this, and the problem is definately with tin
allocating new newsgroups.  This is a BIG deal when users first start up,
and anytime after that when a new newsgroup check is done.  A good way to
see this for yourself is to remove (temporarily) your .tin/tinrc file
and start tin up again, then look at how much memory it takes.  On Netcom,
this is about 15 Megs... unacceptable, unfortunately, and thus we haven't
upgraded.  The behavior appears to be post tin-1.18, so I think I've tracked
the problem down to just this area in check_for_any_new_groups in active.c:

                /*
                 * The following code replaces the original check for new newsgroups,
                 * a source of much aggravation.
                 *
                 * The original algorithm compared each group name in active to (on
                 * average) 1/2 the groups in old_active, for ~N*N/2 string compares.
                 * This works out to ~~ 8,000,000 comparisons for 4000 newsgroups.
                 *
                 * The new algorithm allocates an array of pointers to the active
                 * and old_active array elements, sorts each pointer array with
                 * quicksort, then scans through the two arrays in 1 pass; this takes
                 * 2*N*Log2(N) string compares for the sorts, N for the final pass.
                 * This should work out to ~~ 100,000 comparisons for the same 4000
                 * newsgroups, a BIG, BIG win.
                 */

and so on.  All this allocation is apparrently not being free()d correctly
at the end of the function... or rather, it is, but struct t_notify in tin.h
allocates names as arrays, not dynamically, so this is never really getting
"free()"d.

Unfortunately, manipulating pointers with malloc() is not my strong suite...
could someone else fix this?  Iain, are you listening?

Bruce
-- 
Bruce Sterling Woodcock                 Internet:  sterling@netcom.com
Systems Support - Network Operations    Netcom Online Communication Services
Re: TIN - outrageous memory pig?!
#6813
Author: Iain Lea
Date: Mon, 06 Dec 1993 08:53
15 lines
1570 bytes
Bruce Sterling Woodcock (sterling@netcom.com) wrote:
:
: No, I've been looking into this, and the problem is definately with tin
: allocating new newsgroups.  This is a BIG deal when users first start up,
: and anytime after that when a new newsgroup check is done.  A good way to
: see this for yourself is to remove (temporarily) your .tin/tinrc file
: and start tin up again, then look at how much memory it takes.  On Netcom,
: this is about 15 Megs... unacceptable, unfortunately, and thus we haven't

I have fixed this for the next release.  I would appreciate it if you would
post a context diff to this group so other people can also benefit.

-- 
iain.lea@erlm.siemens.de  +49-9131-7-43402
 'Raus aus dem Alltag, rein in die Kiste'
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