logo       

RE: [TEC 3.9] Fewer large baroc files vs. many small baro c files?: msg#00442

sysutils.tivoli.tme10

Subject: RE: [TEC 3.9] Fewer large baroc files vs. many small baro c files?

Hey Loren,
 
I saw your question just as I was trying to think of a reason to not do the work I'm supposed to be doing right now.  So just for fun, I generated 1,000 and then 10,000 small barocs and compiled/loaded them into a test rb.  Whatever the limit is, it's greater than 10,000 (tec 3.9, fp02).  I quit at 10,000 because it took about 8 minutes to compile/load that many.  My normal rb has 141 baroc files and around 2500 classes, and takes about 2 minutes to import all rules and compile/load.  This is on a Sun Ultra 60 tmr/tec, 1-CPU 450mhz w/external oracle db.
 
BTW, I don't know how other people do it, but I always use the wrb command to manipulate rule files in the rb (I suppose you have to), but for classes I just throw 'em in the .load_classes file and tec doesn't seem to mind.
 
 
-James
 
--------------------------------
#!/bin/ksh
 
X=1
MAX=10000
LOAD_CLASSES=my.load_classes
echo "root.baroc" > $LOAD_CLASSES
 
while [ $X -le $MAX ]; do
    STR=`printf "TEST_%05d" $X`
    echo "STR=$STR"
    BFILE="$STR.baroc"
    echo "TEC_CLASS : $STR  ISA EVENT; END" > $BFILE
    echo "$BFILE" >> $LOAD_CLASSES
    let X=X+1
done
 
 
 
 
 
-----Original Message-----
From: owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx [mailto:owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx]On Behalf Of Loren Cain
Sent: Monday, March 21, 2005 2:37 PM
To: tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx
Subject: RE: [tme10] [TEC 3.9] Fewer large baroc files vs. many small baroc files?

>> after compile/load, you can delete the entire TEC_CLASSES directory(s) and TEC does not seem to notice until the next time you compile/load

 

Dadgummit!  Almost the instant I hit ENTER to send my previous post, it dawned on me that of course you can delete TEC_CLASSES from the rulebase, since the rulebase has been copied to the $DBDIR/tec/rb_dir directory when you load it.  Do’h!

 

But, my original question still stands...

 

Loren Cain

Digicon

 


From: owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx [mailto:owner-tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx] On Behalf Of Loren Cain
Sent: Monday, March 21, 2005 3:31 PM
To: tme10-XtjxT7Vmt5b1ENwx4SLHqw@xxxxxxxxxxxxxxxx
Subject: [tme10] [TEC 3.9] Fewer large baroc files vs. many small baroc files?

 

I’m considering restructuring my baroc files so that I have a separate file for each event class, for documentation purposes. Whenever possible, I prefer to embed documentation into the thing I am documenting (scripts, rulesets, etc) so that it all stays together. It drives admins crazy when they come across a shell script with what appears to be a web page embedded in the comments, but I find it’s easier to maintain that way.

 

For TEC rules, each ruleset file has its web documentation embedded in comments. Obviously, if I put each rule into its own file, that would effect how the rules are processed (specifically the commit_* predicates), so I keep them together in their original ruleset files. However, for event classes, I really want a separate html file for each event because these are what the TEC console “Information” button ultimately displays. Clearly, I could still keep all the classes grouped together in their original files and separate them out when I run my script to generate the html files, but I think it might be cleaner to just put each one in its own file to begin with.

 

I am thinking that there should not be any reason why it would make any difference to the event server whether I define 100 event classes in one big file or in 100 small files. It might cause the compile/load process to take a bit longer, due to the overhead of opening more files, but I could live with that (unless it opens them all simultaneously). I wouldn’t expect there to be any impact on the event server startup time under normal circumstances (in fact, after compile/load, you can delete the entire TEC_CLASSES directory(s) and TEC does not seem to notice until the next time you compile/load).

 

The only gotcha that comes immediately to mind is the .load_classes file. Could there be some sort of arbitrary limit to the number of lines allowed in that file?  It’s hard to imagine, but stranger things have happened.

 

Anyone tried this?

 

Loren Cain

Digicon

 

 

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise