[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regular maintenance Defrag



PureBytes Links

Trading Reference Links

Hi Gary,

--- Gary Fritz <fritz@xxxxxxxx> wrote:
..... snip ....
>Another lister wrote:
> > For users of win9x and ts4,the only way I know
> of,presently,to defrag
> > the data files,in my case bonn,is to use that
> utility written by a
> > list member-is there an easier way?
> 
> This is another beastie entirely.  Bob Scott's
> "unfrag" utility 
> defragments the data structures *inside* the TS
> database.  It 
> shuffles pieces of TS data around *inside* the
> database so TS stores 
> them more efficiently in its own structures.  The
> database file 
> itself might still be spread across hundreds or
> thousands of pieces 
> on your disk.
> 
> The defragging I'm talking is DISK-level defragging,
> which moves 
> pieces of your files around the disk.  That way each
> individual file 
> is in only one or a few pieces, so NT (or whatever
> OS) can access 
> them more efficiently.  In the case of my fragmented
> TS database, the 
> database file was splattered in 75000 pieces all
> around the disk.  
> Obviously it's a lot less efficient to find things
> in that kind of a 
> mess than if the file is in one piece.  No wonder TS
> was slow 
> accessing its database!
> 
> BTW the TS database is very LIKELY to get fragmented
> like this, 
> assuming you keep collecting data over time.  The
> file keeps getting 
> incrementally bigger.  Unless there happens to be
> room (on the disk) 
> at the end of the file, and the OS happens to extend
> it there, the OS 
> will extend the file by allocating another chunk
> somewhere else.  And 
> then you collect another day's data, and another few
> chunks get 
> spread around, and before you know it you have a
> mess like I had.
> 

I use the following "total TS4 defrag" technique which
was suggested by Rod Grisham where "xxx" is either
"Bonn", Sig" or "Cmstk" depending on the feed:

1. "Unfrag" the TS4 tick file to tidy it up.

2. Start the TS4 server to create the 40xxx.idx file.

3. Shutdown the TS4 server and Copy the "Unfragged"
tick file and index (40xxx.dat and 40xxx.idx)to
another drive and delete all "4*.dat" and "4*.idx"
files from the TS4 drive.  This deletes the tick, tick
backup and 5 minute DAT and index files.

4. "Defrag" the TS4 drive which nows runs quickly
since the TS4 tick files are missing

5. Copy the TS4 tick and index files (40xxx.dat and
40xxx.idx) back to the TS4 drive.  The copy process
does a pretty good job of keeping the files
defragmented.

~Bob