Обсуждение: idle DB and resources

Поиск
Список
Период
Сортировка

idle DB and resources

От
Ivan Sergio Borgonovo
Дата:
We've one site already in production and another one that will take
its birth from the previous one.
Since editors have to prune and adapt content from the previous one
I'm going to duplicate the DB and put it online on the same box and
let editors do their job.

Later we may decide to move it on another box or leave it there
since once the editors job will be finished the DB will be much
smaller.

Meanwhile we will have 2 large DB, one of them being nearly idle.
Is the idle DB going to have any impact on performance?

thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


Re: idle DB and resources

От
Craig Ringer
Дата:
Ivan Sergio Borgonovo wrote:

> Meanwhile we will have 2 large DB, one of them being nearly idle.
> Is the idle DB going to have any impact on performance?

I'm far from an expert here, but AFAIK it shouldn't have much impact.
That does depend, though, on just how idle it really is, and how much of
it is accessed at a time when it is used.

If you have queries that involve scans of large proportions of the
tables, or require the reading of big indexes, then even infrequent use
of the database will probably cause performance blips in the main
database due to contention for disk I/O, and will probably push data
from the main DB out of cache too, forcing it to be re-read from disk later.

On the other hand, if your queries don't read huge parts of the DB in at
once and you have small, efficient indexes, I imagine you won't notice
it at all.

You might be able to reduce the impact by putting the idle DB (or if
space is a concern, at least its indexes) on a different disk or disk
array. It won't help with contention for cache memory though, and I
don't know if there's anything much to be done about that.

--
Craig Ringer