Transaction Log Sizing

Transaction Log Sizing

Post by Wendy Perr » Fri, 10 Jan 1997 04:00:00



Does anybody have an recommendations on the best way to size the
transaction log for a database? I typically allocate 25% of whatever I
have allocated for data to my log. So if i I have a 10GB database I
would have a 2500MB log.  I would also expand my log everytime I exand
my database to keep it sized at 25% at all times.

ps - we are using repserver.

 
 
 

Transaction Log Sizing

Post by Pablo Sanch » Fri, 10 Jan 1997 04:00:00



> Does anybody have an recommendations on the best way to size the
> transaction log for a database? I typically allocate 25% of whatever I
> have allocated for data to my log. So if i I have a 10GB database I
> would have a 2500MB log.  I would also expand my log everytime I exand
> my database to keep it sized at 25% at all times.

> ps - we are using repserver.

What's the size of your largest log dump on disk?  How does that size
compare to what you've allocated.

We had one db that was 2+ gig and had a 125MB log.
--
Pablo Sanchez              | Ph # (415) 933.3812        Fax # (415) 933.2821

===============================================================================
I am accountable for my actions.   http://reality.sgi.com/pablo/Sybase_FAQ

 
 
 

Transaction Log Sizing

Post by peter ku » Fri, 10 Jan 1997 04:00:00



> Does anybody have an recommendations on the best way to size the
> transaction log for a database? I typically allocate 25% of whatever I
> have allocated for data to my log. So if i I have a 10GB database I
> would have a 2500MB log.  I would also expand my log everytime I exand
> my database to keep it sized at 25% at all times.

> ps - we are using repserver.

THere is no firm rule for how to size trasanction log in SQL Server,
and I think 25% is a very generous allocation. However, I will pay
more attention to monitoring the use of log and make sure it does not
get filled up. You may like to use threshold manager, available for
system 10 or later, to clean the transaction log properly.

peter kuo
Perot Systems

 
 
 

Transaction Log Sizing

Post by luc van der veur » Fri, 10 Jan 1997 04:00:00


: Does anybody have an recommendations on the best way to size the
: transaction log for a database? I typically allocate 25% of whatever I
: have allocated for data to my log. So if i I have a 10GB database I
: would have a 2500MB log.  I would also expand my log everytime I exand
: my database to keep it sized at 25% at all times.

I think that the size of the log is more related to the update activity
on the database than to its size. I have a 1.6 GB database with a 30 MB
log that has less updates than a 30 MB database (also with a 30 MB log).

During the daytime our logs are dumped every hour, unless a threshold
is reach which happen very infrequently. Looking at the size of our
dumps, a 30 MB log is sufficient for our databases.

Of course if you have big transactions that do things like
insert ... select ... from, where 1000nds of tuples are selected
you'll need more (not on an OLTP system of course :-)).
It all depends on what you want to do.

Luc.

+-----------------------------------------------------------+
| Luc Van der Veurst            ISUG Enhancements Co-Chair  |
| Academic Hospital, VUB        Voice : 32 - 2 477 69 80    |
| Laarbeeklaan 101              Fax   : 32 - 2 477 69 75    |

+-----------------------------------------------------------+
Next ISUG Conferences : Sydney, Australia 10-11 February 1997
                        Bangkok, Thailand 13-14 February 1997

 
 
 

Transaction Log Sizing

Post by H.S. Prasad 4-839 » Sat, 11 Jan 1997 04:00:00


Wendy,

We start of with a log allocation of 20-25%. But this entirely depends on the
type of activity on that particular database - Whether it is entirely
OLTP, or Batch or Mixed system.  If OLTP how many concurrent users on the
system.  If Batch what is the batch activity like size of files processed
in batch processes. If it is mixed environment,  then 20% is a very good
start.  Now after that the log utilization is monitored for a while
and then adjusted accordingly (upward ofcourse). Whatever the size
unless transactions are handled optimally (eg correct autocommit value in PB
etc) any size log can run out of steam.

-Prasad



>> Does anybody have an recommendations on the best way to size the
>> transaction log for a database? I typically allocate 25% of whatever I
>> have allocated for data to my log. So if i I have a 10GB database I
>> would have a 2500MB log.  I would also expand my log everytime I exand
>> my database to keep it sized at 25% at all times.

>> ps - we are using repserver.

>THere is no firm rule for how to size trasanction log in SQL Server,
>and I think 25% is a very generous allocation. However, I will pay
>more attention to monitoring the use of log and make sure it does not
>get filled up. You may like to use threshold manager, available for
>system 10 or later, to clean the transaction log properly.

>peter kuo
>Perot Systems

--
/***********************************************************************/
H.S. Prasad                                     Standard Disclaimer

Phone: (302)634-8398
Fax  : (302)634-8563
/***********************************************************************/
 
 
 

Transaction Log Sizing

Post by Minh Gian » Thu, 16 Jan 1997 04:00:00


Wendy,
        What kind of backup strategy are you using?  If you don't backup your
transaction log dump, you can setup activate truncate on checkpoint.  With
this option, you can have a smaller log.

Minh




> : Does anybody have an recommendations on the best way to size the
> : transaction log for a database? I typically allocate 25% of whatever I
> : have allocated for data to my log. So if i I have a 10GB database I
> : would have a 2500MB log.  I would also expand my log everytime I exand
> : my database to keep it sized at 25% at all times.

> I think that the size of the log is more related to the update activity
> on the database than to its size. I have a 1.6 GB database with a 30 MB
> log that has less updates than a 30 MB database (also with a 30 MB log).

> During the daytime our logs are dumped every hour, unless a threshold
> is reach which happen very infrequently. Looking at the size of our
> dumps, a 30 MB log is sufficient for our databases.

> Of course if you have big transactions that do things like
> insert ... select ... from, where 1000nds of tuples are selected
> you'll need more (not on an OLTP system of course :-)).
> It all depends on what you want to do.

> Luc.

> +-----------------------------------------------------------+
> | Luc Van der Veurst            ISUG Enhancements Co-Chair  |
> | Academic Hospital, VUB        Voice : 32 - 2 477 69 80    |
> | Laarbeeklaan 101              Fax   : 32 - 2 477 69 75    |

> +-----------------------------------------------------------+
> Next ISUG Conferences : Sydney, Australia 10-11 February 1997
>                         Bangkok, Thailand 13-14 February 1997

 
 
 

Transaction Log Sizing

Post by Michael Hean » Fri, 17 Jan 1997 04:00:00




>: Does anybody have an recommendations on the best way to size the
>: transaction log for a database? I typically allocate 25% of whatever I
>: have allocated for data to my log. So if i I have a 10GB database I
>: would have a 2500MB log.  I would also expand my log everytime I exand
>: my database to keep it sized at 25% at all times.
>I think that the size of the log is more related to the update activity
>on the database than to its size. I have a 1.6 GB database with a 30 MB
>log that has less updates than a 30 MB database (also with a 30 MB log).

Exactly right - I too have a 1.6 GB database, with a 35 MB log.  In fact, I
have more than 30 databases on my server, ranging from  200MB to 3GB - and
for all but a handful of those, I've set the log size to ~35 MB.  I used to
use that 20-25% rule-of-thumb, until I added up the cost in wasted disk space.
Now I keep my logs as small as possible, and rely on the thresholds
(and BackTrack) to periodically clean-out the committed transactions.

Quote:>During the daytime our logs are dumped every hour, unless a threshold
>is reach which happen very infrequently. Looking at the size of our
>dumps, a 30 MB log is sufficient for our databases.

Just asking - is there a downside to relying on thresholds to clean out
the transaction logs, rather than automatically doing it every hour?
To date, I've had no problem with thresholds alone doing the job...

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Database Administrator                    Phone:  (301) 838-0200
The Institute for Genomic Research        FAX:    (301) 838-0208
9712 Medical Center Drive
Rockville, MD  20850
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

>+-----------------------------------------------------------+
>| Luc Van der Veurst            ISUG Enhancements Co-Chair  |
>| Academic Hospital, VUB        Voice : 32 - 2 477 69 80    |
>| Laarbeeklaan 101              Fax   : 32 - 2 477 69 75    |

>+-----------------------------------------------------------+
>Next ISUG Conferences : Sydney, Australia 10-11 February 1997
>                        Bangkok, Thailand 13-14 February 1997

 
 
 

Transaction Log Sizing

Post by Bob Lunney - BSG Corporatio » Fri, 17 Jan 1997 04:00:00





> >: Does anybody have an recommendations on the best way to size the
> >: transaction log for a database? I typically allocate 25% of whatever I
> >: have allocated for data to my log. So if i I have a 10GB database I
> >: would have a 2500MB log.  I would also expand my log everytime I exand
> >: my database to keep it sized at 25% at all times.

[lots of good observations about logs snipped]

> Just asking - is there a downside to relying on thresholds to clean out
> the transaction logs, rather than automatically doing it every hour?
> To date, I've had no problem with thresholds alone doing the job...

> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

> Database Administrator                    Phone:  (301) 838-0200
> The Institute for Genomic Research        FAX:    (301) 838-0208
> 9712 Medical Center Drive
> Rockville, MD  20850
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Not a problem, really, but a potential disadvantage:

If you only rely on thresholds to dump the transaction logs, you lose
the ability to reload a database up to an approximate point in time.  If
you dump every hour, *plus* enable thresholds, you can sleep much better
knowing the log has the best chance of not getting overrun (threshold)
and knowing you can recover a database to at least a given hour of a any
day.

--
Bob Lunney              | Building tomorrow's legacy
BSG-Cary                | systems today. (tm)

(919) 461-6261          | the dark.  -- Dwight Moody

 
 
 

Transaction Log Sizing

Post by m » Sat, 18 Jan 1997 04:00:00




>> Just asking - is there a downside to relying on thresholds to clean out
>> the transaction logs, rather than automatically doing it every hour?
>> To date, I've had no problem with thresholds alone doing the job...

>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

>> Database Administrator                    Phone:  (301) 838-0200
>> The Institute for Genomic Research        FAX:    (301) 838-0208
>> 9712 Medical Center Drive
>> Rockville, MD  20850
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

>Not a problem, really, but a potential disadvantage:

>If you only rely on thresholds to dump the transaction logs, you lose
>the ability to reload a database up to an approximate point in time.  If
>you dump every hour, *plus* enable thresholds, you can sleep much better
>knowing the log has the best chance of not getting overrun (threshold)
>and knowing you can recover a database to at least a given hour of a any
>day.

>--
>Bob Lunney          | Building tomorrow's legacy

Another disadvantage I can see to using thresholds is that the threshold
usually gets hit during a busy time, so dumping the log at that time hurts
performance as opposed to dumping hourly or whatever at less busy times.

Mike

 
 
 

Transaction Log Sizing

Post by L. Tse » Thu, 30 Jan 1997 04:00:00



>> : Does anybody have an recommendations on the best way to size the
>> : transaction log for a database? I typically allocate 25% of whatever I
>> : have allocated for data to my log. So if i I have a 10GB database I
>> : would have a 2500MB log.  I would also expand my log everytime I exand
>> : my database to keep it sized at 25% at all times.

When having a db bigger than say 1 GB, I would go by db activity instead
of 25% rule in sizing tran log. If the db involes a lot of big updates,
inserts, size the tran log a bit bigger. Also, dump tran regularly
helps not only on tran log full problem but also on recovery. I had
an 8+GB db with about 250+ users hitting an OLTP apps. By dumping
the tran log every 3 hours, I only need 300MB tran log. However,
when doing some maintenance work, I need to run big transaction
in several small batches.
 
 
 

1. transaction log size problem

 have seen a lot of posts about this log file.... we are having similiar
problems with the filesize.

But it has only started causing a problem after replication was enabled. We
are replicating our database to our ISP's webserver so that customers can
order online from our new website.

Our datafile is 245MB and yesterday our logfile grew to  250GB! Needless to
say the server ground to a halt and we couldnt do anything for 3 hours!

It's at 70MB today... and growing.

What do I need to do? (besides go on a SQL Admin Course I hear everybody
say!)

We are new to SQL, etc, etc... and I dont want this to happen again....

Any help would be much appreciated.

Thanks

Mark Sloan

2. update question

3. SQL 2000 Transaction Log Size.

4. VFP ODBC to SAP/R3

5. Transaction Log Size

6. Changing the column to an IDENTITY Column

7. How to free up Database and Transaction log size

8. Interupted Modify leaves 0 rows in the table!

9. Transaction Log Size

10. Create a job to check db transaction log size

11. Transaction Log size

12. How do I decrease Transaction log size?

13. Minimizing Transactions Log Size