Re: [HACKERS] Sequential scan speed, mmap, disk i/o

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Sequential scan speed, mmap, disk i/o
Date: 1998-05-14 14:51:02
Message-ID: 199805141451.KAA09160@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> >
> > Someone was complaining about sequential scan speed, so I decided to run
> > a test.
>
> > wc 41 sec
> > wc -l 31 sec
> > dd if=/u/pg/data/base/test/testv of=/dev/null bs=512 32 sec
> > dd if=/u/pg/data/base/test/testv of=/dev/null bs=8k 31 sec
> > dd if=/u/pg/data/base/test/testv of=/dev/null bs=256k 31 sec
> > dd if=/u/pg/data/base/test/testv of=/dev/null bs=1m 30 sec
> > mmap() of file in 8k chunks 99 sec
> > mmap() of file in 8mb chunks 40 sec
> > mmap() of file in 32mb chunks 56 sec
> >
> > PostgreSQL sequential scan 37 sec
>
> Let me add, these times are on a PP200, with SCSI Ultra Barracuda
> drives, BSD/OS 3.1, 64MB RAM.

Also, the table was very small, with two ints, a char(10), and a
varchar(50), so PostgreSQL was processing most of the 177MB of data in
terms of having to read most of each block.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-05-14 14:54:09 Re: [HACKERS] Sequential scan speed, mmap, disk i/o
Previous Message D'Arcy J.M. Cain 1998-05-14 14:40:39 char(8) vs char8