Re: High Disk write and space taken by PostgreSQL

Поиск
Список
Период
Сортировка
От J Ramesh Kumar
Тема Re: High Disk write and space taken by PostgreSQL
Дата
Msg-id CA+-36iGrckXc3bvpJJ0AECjFeaoDpX892jyyJ2Hk-K=bHwDSvA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: High Disk write and space taken by PostgreSQL  (David Barton <dave@oneit.com.au>)
Ответы Re: High Disk write and space taken by PostgreSQL  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: High Disk write and space taken by PostgreSQL  (Claudio Freire <klaussfreire@gmail.com>)
Re: High Disk write and space taken by PostgreSQL  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-performance
Hi David Barton,

Please find the information below. 

Are you able to provide a table schema? 

There are 109 different types of table. I am maintaining some tables are daily tables and some tables are ID based. So totally we have created around 350 tables and dropped around 350 tables. I will drop the old table and I don't delete any records. I am maintaing only last 30 days tables. I dropped tables which are older than 30 days. All the tables are only have basic data types like int, smallint, bigint, varchar.

 
Were you using MyISAM or InnoDB on MySQL?

I am using MyISAM tables in MySQL. 


What are your indexes?  Is the size in the indexes or the database tables?

The size I mentioned is the total folder size of the data directory. There is no difference in the database schema / index between MySQL and PostgreSQL.

If you back up the database & restore clean, what is the size comparison of the database filed on the restored copy to the existing one?

I don't take backup and restore.

 Is there any period where you could try a full vacuum?

Since my app only doing inserts and drops(no delete), I believe the vacuum will not give any advantage. So I have the below configuration in my database. Event the updates only performed in a very small table which has 5 int + 1 small int + 1 real fields.  

# To avoid freqent autovacuum
autovacuum_freeze_max_age = 2000000000
vacuum_freeze_min_age = 10000000
vacuum_freeze_table_age = 150000000
 
Thanks,
Ramesh

On Thu, Aug 16, 2012 at 9:06 AM, David Barton <dave@oneit.com.au> wrote:
Hi Ramesh,

Are you able to provide a table schema?  Were you using MyISAM or InnoDB on MySQL?

If you back up the database & restore clean, what is the size comparison of the database filed on the restored copy to the existing one?  It may be full of empty tuples.  Is there any period where you could try a full vacuum?

What are your indexes?  Is the size in the indexes or the database tables?

At the current rate of insertion, that table is going to get very large very quickly.  Do you have anything deleting the rows afterwards?  I have no experience with databases past 50M rows, so my questions are just so you can line up the right info for when the real experts get online :-)

Regards, David


On 16/08/12 11:23, J Ramesh Kumar wrote:

Hi,

My application has high data intensive operations (high number of inserts 1500 per sec.). I switched my application from MySQL to PostgreSQL. When I take performance comparison report between mysql and pgsql, I found that, there are huge difference in disk writes and disk space taken. Below stats shows the difference between MySQL and PostgreSQL.


MySQLPostgreSQL
Inserts Per Second*15001500
Updates Per Second*6.56.5
Disk Write Per Second*0.9 MB6.2 MB
Database Size Increased Per day* 13 GB36 GB

* approx values

Why this huge difference in disk writes and disk space utilization? How can I reduce the disk write and space ? Kindly help me. Please let me know, if you require any other information(such as postgres.conf).

Thanks,
Ramesh


В списке pgsql-performance по дате отправления:

Предыдущее
От: David Barton
Дата:
Сообщение: Re: High Disk write and space taken by PostgreSQL
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: High Disk write and space taken by PostgreSQL