what if native systemd service is slower than old sysvinit script?

Tom Lane tgl at redhat.com
Wed Sep 14 00:37:05 UTC 2011


=?ISO-8859-2?Q?Micha=B3_Piotrowski?= <mkkp4x4 at gmail.com> writes:
> 2011/9/14 Tom Lane <tgl at redhat.com>:
>> Certainly postgresql.init was never exactly lean-and-mean, so it
>> seems like it ought to have been doing more work than the unit file
>> requires.  Are you sure you were comparing apples to apples as far as
>> the state of the database, kernel disk cache, etc goes?

> I copied the service to /etc/systemd/system and changed PGDATA
> variable, then I enabled the service and rebooted. After boot I
> checked system boot time with systemd-analyze - I saw that it starts
> slow, so I disabled it and deleted from /etc/systemd/system. After
> another reboot again checked boot time with systemd-analyze.

> I'll check tomorrow how repeatable is native service boot time.

I'd suggest first timing some rounds of manual "service postgresql start",
"service postgresql stop" to see what things look like without all
the other noise involved in a system boot.

			regards, tom lane


More information about the devel mailing list