Serial reads & lseek calls.

From: Denis Perchine <dyp(at)perchine(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Serial reads & lseek calls.
Date: 2000-06-12 05:05:27
Message-ID: 00061212100601.27884@dyp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello all,

lseek(4, 26394624, SEEK_SET) = 26394624
read(4, "@\1\210\1\0 \0 \234\237\304\0008\237\304\0\324\236\304"..., 8192) = 8192
lseek(4, 26402816, SEEK_SET) = 26402816
read(4, "@\1\210\1\0 \0 \234\237\304\0008\237\304\0\324\236\304"..., 8192) = 8192
lseek(4, 26411008, SEEK_SET) = 26411008
read(4, "@\1\210\1\0 \0 \234\237\304\0008\237\304\0\324\236\304"..., 8192) = 8192
lseek(4, 26419200, SEEK_SET) = 26419200
read(4, "@\1\210\1\0 \0 \234\237\304\0008\237\304\0\324\236\304"..., 8192) = 8192
lseek(4, 26427392, SEEK_SET) = 26427392
read(4, "@\1\210\1\0 \0 \234\237\304\0008\237\304\0\324\236\304"..., 8192) = 8192
lseek(4, 26435584, SEEK_SET) = 26435584
read(4, "@\1\210\1\0 \0 \234\237\304\0008\237\304\0\324\236\304"..., 8192) = 8192

I ran strace -c -p to look what postgres is doing during removing large objects...
And I found out that most of the syscalls called are read & lseek.
I will not speculate on the idea that if you would like to read lots of data it will be faster
to do this in one read call. But calling lseek when you do not need it... It's a little bit too
much.

--
Sincerely Yours,
Denis Perchine

----------------------------------
E-Mail: dyp(at)perchine(dot)com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------

Browse pgsql-hackers by date

  From Date Subject
Next Message Adriaan Joubert 2000-06-12 05:15:18 Re: [HACKERS] Re: Hack to make postgres compile on Dec 4.0f with GCC
Previous Message Bruce Momjian 2000-06-12 04:02:31 pg_shadow change