473,408 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Best practice for Data size/Log Size ratio

Just wanted to know what is a general rule of thumb when determining log file space against a database's data file.

We allow our data file for our database to grow 10%, unlimited. We do not allow our log file to autogrow due to a specific and poorly written process (which we are in a three month process of remove) that can balloon the log file size.

Should it be 10% of the Data file, i.e. if the Date file size is 800MB the log file should be 8MB?

I realize there are a myraid of factors that go against file size but a general starting point would be nice.

Thanks
Jeff

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #1
4 20010

"Jeffrey Sheldon via SQLMonster.com" <fo***@SQLMonster.com> wrote in message
news:5a******************************@SQLMonster.c om...
Just wanted to know what is a general rule of thumb when determining log
file space against a database's data file.

We allow our data file for our database to grow 10%, unlimited. We do not
allow our log file to autogrow due to a specific and poorly written
process (which we are in a three month process of remove) that can balloon
the log file size.

Should it be 10% of the Data file, i.e. if the Date file size is 800MB the
log file should be 8MB?

I realize there are a myraid of factors that go against file size but a
general starting point would be nice.

Thanks
Jeff

--
Message posted via http://www.sqlmonster.com


I don't believe there's any MS recommendation on this, although I'm happy to
be corrected. I think I read a post from an MVP saying he uses the size of
the largest table plus 10%; personally, with no other information to base a
decision on, I would go for 20% of the size of the data file(s). But as you
say, there are a myriad of factors, so you may as well just pick a number
(do you have another similar database to compare against, perhaps?), and
then adjust it as you go along. Beware of auto-grow/shrink, though, which
can be a bit of a pain if it kicks in at the wrong time - it's probably
better to go with a fixed size and too large rather than too small,
especially since disk space is relatively cheap.

Simon
Jul 23 '05 #2
Thanks Simon,

I will use our largest database. It is funny that this is really a trail and error process (I remember some formula of calculating the sizes but even that is not an exact science)

Jeff

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #3
"Jeffrey Sheldon via SQLMonster.com" <fo***@SQLMonster.com> wrote in
news:83******************************@SQLMonster.c om:
Thanks Simon,

I will use our largest database. It is funny that this is really
a trail and error process (I remember some formula of calculating
the sizes but even that is not an exact science)


The log is akin to a journal: it captures all the changes to your
database. To size it, make it large enough to hold all the expected
changes to the database between log dumps. I'd suggest you add a
buffer to the size for the 'unexpected' changes.

Also, if you have a large log, it's not going to impact performance.
You may waste some space but disk space is relatively cheap.

On a different note, when you make a change to a table, the table
isn't really changed, the changes go to the log. Only at
'checkpoint' are the changes in memory synchronized with the table.
But you probably already knew that ...
--
Pablo Sanchez - Blueoak Database Engineering, Inc
http://www.blueoakdb.com
Jul 23 '05 #4
I agree w/ Pablo in having a large log wont impact performance if you
have space on your server to accomadate this. Your going to take hits
on performance everytime your log has to grow. so if your bd isnt a
high transaction db and there are few changes throughout the day a
smaller log would be fine eg. 10% or something of that nature. DB's w/
high volumes of transactions throughout the day will fill up the log
faster making it autogrow a lot thus hurting performance a little. I
feel everyone's DB's a different in that aspect so you just need to
monitor it for a bit and see what works best for you.

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

131
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately...
0
by: Andy Dingley | last post by:
I'm just building my first Atom feeds (at http://gamesradar.com/rss/ps2/ should you care ) One of the requirements here is to include lots of rich media (screenshots) with each entry. There...
2
by: Joe Bloggs | last post by:
I have a general question on best practice regarding data access. I have the code below, a static method defined in a class that I use in a data layer dll. The method takes a string as its...
0
by: Johannes Unfried | last post by:
Problem Best practice needed to marshal STL data from managed code to unmanaged code & vice vers Details managed code is written in managed C++ & accesses the unmanaged code (i.e. lives in a...
17
by: | last post by:
I have an app that retrieves data from an Access database. At the moment I have the SQL string as a Const in my app. I understand this is not best practice. I don't want the user to have access to...
6
by: RS | last post by:
Hi, What's the best practice to save user preferences for a .NET application . For example if the user does not want anymore to see Tip-Of-The-Day (TOTD), the user can tick a checkbox on the...
10
by: Jay Wolfe | last post by:
Hello, I'm trying to make sure I use best practices (and hence save myself some headaches) with the declaration and definition of global variables. Let's say I have an app with 30 files,...
7
by: Tzanko | last post by:
As we all know, there is a 8060 bytes size limit on SQL Server rows. I have a table which requires a number of text fields (5 or 6). Each of these text fields should support a max of 4000...
2
by: dhable | last post by:
I'm developing a web system and based on some patterns I've seen elsewhere, I made a single file (model.py) to hold all of the functions and classes that define the model porition of the...
13
by: G | last post by:
Hello, Looking for opinions on a fairly simple task, new to ASP.net (C#) and want to make sure I do this as efficiently as possible. I have a web based form, and I need to run some SQL before...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.