Friday, March 9, 2012

Quick question on log file sizes

I'll be taking over an existing database in the near future and I noticed
something that seemed odd to me. That would be that the log file rather
large, 15GB. On the days that I've been monitoring this, I have never seen
more the 1% of the log space being used. When I asked about this, the answer
I got back was this: The log file was created that large so that no matter
how much data was in it, the log file would be physically contiguous.
My question, is this line of reasoning sound? If the physical file
contiguous, does this improve SQL performance?
TIAAbsolutely for a number of reasons and true for data files as well. Log
files are read and written to in a mostly sequential manor. If the file is
contiguous on disk the heads will not have to move back and forth as it
reads or writes. On a small system you may never notice the difference but
on a busy system it can. The other reason is that having plenty of free
space will ensure the log file never has to grow which is expensive. Is
15GB too big? That depends on what you are doing with it. While you may
only see 1% usage during the day what about during reindexing? It is always
better to have too much free space than too little.
--
Andrew J. Kelly SQL MVP
"JD" <joeydba@.yahoo.com> wrote in message news:421a5260$1@.news.qgraph.com...
> I'll be taking over an existing database in the near future and I noticed
> something that seemed odd to me. That would be that the log file rather
> large, 15GB. On the days that I've been monitoring this, I have never
> seen
> more the 1% of the log space being used. When I asked about this, the
> answer
> I got back was this: The log file was created that large so that no matter
> how much data was in it, the log file would be physically contiguous.
> My question, is this line of reasoning sound? If the physical file
> contiguous, does this improve SQL performance?
> TIA
>|||Thank you Andrew for the reply.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OYaMyrGGFHA.4004@.tk2msftngp13.phx.gbl...
> Absolutely for a number of reasons and true for data files as well. Log
> files are read and written to in a mostly sequential manor. If the file
is
> contiguous on disk the heads will not have to move back and forth as it
> reads or writes. On a small system you may never notice the difference but
> on a busy system it can. The other reason is that having plenty of free
> space will ensure the log file never has to grow which is expensive. Is
> 15GB too big? That depends on what you are doing with it. While you may
> only see 1% usage during the day what about during reindexing? It is
always
> better to have too much free space than too little.
> --
> Andrew J. Kelly SQL MVP
>
> "JD" <joeydba@.yahoo.com> wrote in message
news:421a5260$1@.news.qgraph.com...
> > I'll be taking over an existing database in the near future and I
noticed
> > something that seemed odd to me. That would be that the log file rather
> > large, 15GB. On the days that I've been monitoring this, I have never
> > seen
> > more the 1% of the log space being used. When I asked about this, the
> > answer
> > I got back was this: The log file was created that large so that no
matter
> > how much data was in it, the log file would be physically contiguous.
> >
> > My question, is this line of reasoning sound? If the physical file
> > contiguous, does this improve SQL performance?
> >
> > TIA
> >
> >
>

No comments:

Post a Comment