an import into postgresql
cguttesen at yahoo.dk
Fri Feb 4 07:40:52 PST 2005
I have a postgresql-dump at 748 MB bz2-compressed (3,8
I did an import on FreeBSD 5.3 and 6.0, NetBSD 2.0 and
Gentoo Linux using kernel 2.6.10.
The import was done on a laptop with 512 MB ram and a
3.2 GHz P4. I applied
-O2 -funroll-loops -march=p4
in /etc/make.conf and did 'make world/kernel' using
GENERIC as kernel on FreeBSD. Kernel on FreeBSD 6.0
and Gentoo and NetBSD was rebuild without smp.
The disk was recognized as a UDMA 33 device.
Postgresql was 7.4.6.
The import-cmd was:
time bzcat dump.bz2 | PGUSER=pgsql psql db
FreeBSD 5.3 release:
psql: 55 user, 36 system, 1 % CPU 1.40.17 total
FreeBSD 5.3 stable:
psql: 55 user, 36 system, 1 % CPU 1.39.45 total
FreeBSD 6.0 current (wo. debugging and smp in kernel):
psql: 55 user, 35 system, 2 % CPU 1.39.20 total
NetBSD 2.0 (optimized using cpuflags in mk.conf):
pgsql 49.16s user 61.99s system 2% cpu 1:30:05.82
Gentoo (using xfs as fs):
psql 136,79s user 53,57s system 1% cpu 2:45:01,57
What puzzles me is the Gentoo-import which is almost
twice as long as *BSD. When I scp'ed the file from
another host the transfer-rate quickly dropped from
around 7.4 MB/s to 2.5 MB/s whereas *BSD would
transfer the file at approx. 7.2 MB/s.
I tried the same on our Dell 2850 with a
Perc-controller but only FreeBSD would install and
boot where NetBSD's i386 would install but not boot. I
installed Gentoo (amd64) but grub was apperantly
misconfigured and panicked (stupid installer
I'll try the i386-port and lilo and will post the same
import-times if any one is interested.
More information about the freebsd-performance