Re: File Fragmentation

From: "jg" <jg(at)rilk(dot)com>
To: "Vick Khera" <vivek(at)khera(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: File Fragmentation
Date: 2013-03-20 14:47:34
Message-ID: 44a4-5149cc00-3-6b8b4580@242648327
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I create a test cas on Linux:
postgres=# create table a (v int);
postgres=# create table b (v int);

Then a while(true) over the following script where 24577 and 24580 are the files of the tables a and b
#!/bin/sh
psql test -c 'insert into a select generate_series(1,100000,1);'
psql test -c 'insert into b select generate_series(1,100000,1);'
psql test -c 'checkpoint;'
/usr/sbin/filefrag -v 24577 24580
ls -lh 24577 24580

After few minutes, I got 100 extend by files.

The file fragmentation happens on Windows and Linux, too.

I not sure that the Wait IO on Windows is related to file fragmentation.
I try to find a way to analyse the situation.

JG

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Achilleas Mantzios 2013-03-20 14:47:48 Re: "Leaking" disk space on FreeBSD servers
Previous Message Vick Khera 2013-03-20 14:39:58 Re: "Leaking" disk space on FreeBSD servers