Share via


Database Resource Planning

When you initially create your instance database and application databases, you should define the databases using adequate file sizes in the instance configuration and in the application definition. Generous initial file sizes and adequate disk space reduce the chance that the databases will run out of space and cause performance to degrade temporarily while the databases resize.

The adequate file sizes for your databases depend on the estimated number of subscribers, subscriptions, events, and notifications that the instance and the application will support. Use the following guidelines to plan database sizes.

Application Database Sizes

Each application database stores subscriptions, events, notifications, application status information, possibly historical data in the form of chronicles, and metadata about the application.

Event and notification data is removed according to the schedule that is defined by the application definition. In this node, the developer also specifies a retention age for data. Use the combination of retention age and vacuuming schedule to estimate how much event and notification data will collect in the application database.

After you determine how much event and notification data will accumulate in the database before the vacuuming process removes the data, you can use the Microsoft SQL Server database sizing methods to estimate the size of the application database.

To plan the database size for an application, gather the following information:

  • The estimated number of events that will be collected during peak periods before the events are removed by the vacuuming process, and the size of each event row as determined by the event class fields in the ADF.
  • The estimated total number of subscriptions that you expect for the application, and the size of each subscription row as determined by the subscription class fields in the ADF.
  • The estimated number of notifications that will be generated before they are removed by the vacuuming process. If you are using distributor logging, double the number of notifications. Use the notification class fields in the ADF to determine the size of each notification row.
  • The amount of metadata. Application databases typically contain from 5 to 10 megabytes (MB) of metadata.
  • Chronicle tables and indexes. These objects add to the size of the database.

Size estimates for application databases can be difficult to determine because of indexes and application settings. For more information about estimating database sizes, see Estimating the Size of a Database.

Instance Database Size

The data in an instance database is much more stable than data in application databases. If you can estimate the number of subscribers and the number of subscriber devices, you should be able to estimate the instance database size. To estimate the size, gather the following information:

  • The total number of expected subscribers for all applications hosted by the instance.
  • The size of each subscriber row.
  • The total number of expected subscriber devices.
  • Metadata. Estimate the amount of metadata for your instance at 2 MB.

You can use the following equation to estimate the instance database size:

instance database size =  2 * ((number_of_subscribers * subscriber_row_size (in bytes)) + (number_of_subscriber_devices * 200 bytes) + 2 MB metadata)

Log File Sizes

The application database is typically a very active database, with many transactions. This activity can cause the transaction log to grow quickly. You should therefore start with a log file size equal to 25 percent of the initial application database size. You can use the same estimate for the instance database log file. If the log is truncated during log file backups or during a checkpoint, the log maintains a reasonable size. For more information, see Transaction Log Truncation.

See Also

Concepts

Database Considerations
Defining the Application Database
Defining the Instance Database
Planning a Notification Services System

Help and Information

Getting SQL Server 2005 Assistance