VMware Cloud Community
tatung70
Contributor
Contributor

VC SQL Database size

Our database is about 15 GB, counting both the log and the data file. And it has about 2 GB free space in the DB.

We have 16 Hosts and about 300 VMs.

Is this size correct?

Our queries (performance, etc) are very slow to respond. CPU is nothing and RAM is fine.

Running the latest version of VC/ESX - both with all patches.

Thanks

0 Kudos
6 Replies
Dave_Mishchenko
Immortal
Immortal

The below is from the VI install guide. How large is the data file and how much free space do you have left in it?

Storage requirements can be larger if your database runs on the same hardware as

the VirtualCenter Server machine. The size of the database varies with the number

of hosts and virtual machines you manage. Using default settings for a year with

25 hosts and 8 to 16 virtual machines each, the total database size can consume up

to 2.2GB (SQL) or 1.0GB (Oracle).

0 Kudos
tatung70
Contributor
Contributor

My question has your answers. Both files at 15 GB total with 2 GB free.

Based on what I have seen, I think something is wrong as the DB size should be well under 5 GB.

As a note, we have been up for only 5 months.

0 Kudos
Dave_Mishchenko
Immortal
Immortal

If you database has a 12 GB data file and 3 for log, then you have a problem related to VC. If the database has a data file of 3 GB and log of 12 GB then you have a DBA issue.

0 Kudos
esiebert7625
Immortal
Immortal

That does seem rather large, I would check your vpx_hist_stat table and also the vpx_task and vpx_event tables. If you read through this post of mine I describe methods for purging the db. You can also change your statistic intervals to lessen the amount of data collected.

http://www.vmware.com/community/thread.jspa?messageID=626899&#626899

0 Kudos
VirtualNoitall
Virtuoso
Virtuoso

Hello,

I would bet most of that space is the DB transaction log. If so look at adding a db maintenance routine to frequently back up the transaction log and truncate it. Run the job hourly and keep a day or two's worth depending on your db backup plan and requirements.

0 Kudos
joe_cruz
Contributor
Contributor

If this is an MS SQL Database you can do these steps to help shrink the DB:

1. perform a full backup of the VCenter database

2. execute the SQL command:

backup log with truncate_only

3. immediately perform a full backup of your database

4. Perform a shrink operation (usually in SQL Enterprise Manager or Management Studio, just right-click on the DB and choose "Shrink Database...."

Hope that helps.

0 Kudos