pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedperformance of pg_upgrade "Copying user relation files"
5+ messages / 2 participants
[nested] [flat]
* performance of pg_upgrade "Copying user relation files"
@ 2019-10-02 22:30 Glenn Pierce <glennpierce@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Glenn Pierce @ 2019-10-02 22:30 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
I have been trying to upgrade postgres 9.5 to 9.6 with pg_upgrade
Everything seems to start fine but when pg_upgrade gets to "Copying
user relation files"
It takes ages to complete copying.
ie
Each file like
/var/lib/pgsql/9.5/data/base/24602/25140
is 1G and taking ~5-10 minutes to copyand that directory is 223G of
about 990 files
After a couple of hours running pg_upgrade I had to give up.
looking a iotop I was seeing
99% IO load caused by [md0_raid1]
and only seeing pg_upgrade go to 99% every 3-4 seconds
I had no other processes using io or high cpu.
Has anyone got any pointers of what could be the issue ?
Ps running cp on /var/lib/pgsql/9.5/data/base/24602/25140 to my home
directory is instantaneous
System is Centos 7
Thanks
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: performance of pg_upgrade "Copying user relation files"
@ 2019-10-02 23:11 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Glenn Pierce <glennpierce@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Adrian Klaver @ 2019-10-02 23:11 UTC (permalink / raw)
To: Glenn Pierce <glennpierce@gmail.com>; pgsql-general@lists.postgresql.org
On 10/2/19 3:30 PM, Glenn Pierce wrote:
> I have been trying to upgrade postgres 9.5 to 9.6 with pg_upgrade
>
> Everything seems to start fine but when pg_upgrade gets to "Copying
> user relation files"
> It takes ages to complete copying.
This is going to need more information:
1) What is the pg_upgrade command you are using?
2) Where are you upgrading from/to?
3) What OS, version?
>
> ie
> Each file like
>
> /var/lib/pgsql/9.5/data/base/24602/25140
> is 1G and taking ~5-10 minutes to copyand that directory is 223G of
> about 990 files
>
> After a couple of hours running pg_upgrade I had to give up.
>
> looking a iotop I was seeing
>
> 99% IO load caused by [md0_raid1]
>
> and only seeing pg_upgrade go to 99% every 3-4 seconds
>
> I had no other processes using io or high cpu.
>
> Has anyone got any pointers of what could be the issue ?
>
> Ps running cp on /var/lib/pgsql/9.5/data/base/24602/25140 to my home
> directory is instantaneous
>
> System is Centos 7
>
> Thanks
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: performance of pg_upgrade "Copying user relation files"
@ 2019-10-02 23:16 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Glenn Pierce <glennpierce@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Adrian Klaver @ 2019-10-02 23:16 UTC (permalink / raw)
To: Glenn Pierce <glennpierce@gmail.com>; pgsql-general@lists.postgresql.org
On 10/2/19 3:30 PM, Glenn Pierce wrote:
> I have been trying to upgrade postgres 9.5 to 9.6 with pg_upgrade
>
> Everything seems to start fine but when pg_upgrade gets to "Copying
> user relation files"
> It takes ages to complete copying.
Adding to previous list:
4) Which pg_upgrade version did you use, 9.5 or 9.6?
>
> ie
> Each file like
>
> /var/lib/pgsql/9.5/data/base/24602/25140
> is 1G and taking ~5-10 minutes to copyand that directory is 223G of
> about 990 files
>
> After a couple of hours running pg_upgrade I had to give up.
>
> looking a iotop I was seeing
>
> 99% IO load caused by [md0_raid1]
>
> and only seeing pg_upgrade go to 99% every 3-4 seconds
>
> I had no other processes using io or high cpu.
>
> Has anyone got any pointers of what could be the issue ?
>
> Ps running cp on /var/lib/pgsql/9.5/data/base/24602/25140 to my home
> directory is instantaneous
>
> System is Centos 7
>
> Thanks
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: performance of pg_upgrade "Copying user relation files"
@ 2019-10-03 00:47 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Klaver @ 2019-10-03 00:47 UTC (permalink / raw)
To: Glenn Pierce <glennpierce@gmail.com>; +Cc: pgsql-general
On 10/2/19 4:58 PM, Glenn Pierce wrote:
Please reply to list also.
Ccing list.
>
>
> On Thu, 3 Oct 2019, 00:11 Adrian Klaver, <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
> On 10/2/19 3:30 PM, Glenn Pierce wrote:
> > I have been trying to upgrade postgres 9.5 to 9.6 with pg_upgrade
> >
> > Everything seems to start fine but when pg_upgrade gets to "Copying
> > user relation files"
> > It takes ages to complete copying.
>
> This is going to need more information:
>
> 1) What is the pg_upgrade command you are using?
>
>
> I was using pg_upgrade from the installed postgres 9.6
>
> /usr/pgsql-9.6/bin/pg_upgrade --old-bindir=/usr/pgsql-9.5/bin/
> --new-bindir=/usr/pgsql-9.6/bin/ --old-datadir=/var/lib/pgsql/9.5/data/
> --new-datadir=/var/lib/pgsql/9.6/data/
>
>
> I was following the article from
>
> https://medium.com › postgresql-upg...
> Web results
> PostgreSQL upgrade on CentOS - Dzmitry Plashchynski - Medium
>
>
>
> 2) Where are you upgrading from/to?
>
>
> Trying to upgrade from 9.5 to 9.6
> Same machine with both versions installed.
>
>
> 3) What OS, version?
>
> Centos 7.4
>
>
> Thanks
>
>
> >
> > ie
> > Each file like
> >
> > /var/lib/pgsql/9.5/data/base/24602/25140
> > is 1G and taking ~5-10 minutes to copyand that directory is 223G of
> > about 990 files
> >
> > After a couple of hours running pg_upgrade I had to give up.
> >
> > looking a iotop I was seeing
> >
> > 99% IO load caused by [md0_raid1]
> >
> > and only seeing pg_upgrade go to 99% every 3-4 seconds
> >
> > I had no other processes using io or high cpu.
> >
> > Has anyone got any pointers of what could be the issue ?
> >
> > Ps running cp on /var/lib/pgsql/9.5/data/base/24602/25140 to my home
> > directory is instantaneous
> >
> > System is Centos 7
> >
> > Thanks
> >
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: performance of pg_upgrade "Copying user relation files"
@ 2019-10-03 13:46 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 0 replies; 5+ messages in thread
From: Adrian Klaver @ 2019-10-03 13:46 UTC (permalink / raw)
To: Glenn Pierce <glennpierce@gmail.com>; +Cc: pgsql-general
On 10/2/19 5:47 PM, Adrian Klaver wrote:
> On 10/2/19 4:58 PM, Glenn Pierce wrote:
> Please reply to list also.
> Ccing list.
>>
>>
>> On Thu, 3 Oct 2019, 00:11 Adrian Klaver, <adrian.klaver@aklaver.com
>> <mailto:adrian.klaver@aklaver.com>> wrote:
>>
>> On 10/2/19 3:30 PM, Glenn Pierce wrote:
>> > I have been trying to upgrade postgres 9.5 to 9.6 with pg_upgrade
>> >
>> > Everything seems to start fine but when pg_upgrade gets to
>> "Copying
>> > user relation files"
>> > It takes ages to complete copying.
>>
>> This is going to need more information:
>>
>> 1) What is the pg_upgrade command you are using?
>>
>>
>> I was using pg_upgrade from the installed postgres 9.6
>>
>> /usr/pgsql-9.6/bin/pg_upgrade --old-bindir=/usr/pgsql-9.5/bin/
>> --new-bindir=/usr/pgsql-9.6/bin/
>> --old-datadir=/var/lib/pgsql/9.5/data/
>> --new-datadir=/var/lib/pgsql/9.6/data/
What happens if you use the -j option:
https://www.postgresql.org/docs/9.6/pgupgrade.html
-j
--jobs
number of simultaneous processes or threads to use
"The --jobs option allows multiple CPU cores to be used for
copying/linking of files and to dump and reload database schemas in
parallel; a good place to start is the maximum of the number of CPU
cores and tablespaces. This option can dramatically reduce the time to
upgrade a multi-database server running on a multiprocessor machine."
>>
>>
>> I was following the article from
>>
>> https://medium.com › postgresql-upg...
>> Web results
>> PostgreSQL upgrade on CentOS - Dzmitry Plashchynski - Medium
>>
>>
>>
>> 2) Where are you upgrading from/to?
>>
>>
>> Trying to upgrade from 9.5 to 9.6
>> Same machine with both versions installed.
>>
>>
>> 3) What OS, version?
>>
>> Centos 7.4
>>
>>
>> Thanks
>>
>>
>> >
>> > ie
>> > Each file like
>> >
>> > /var/lib/pgsql/9.5/data/base/24602/25140
>> > is 1G and taking ~5-10 minutes to copyand that directory is
>> 223G of
>> > about 990 files
>> >
>> > After a couple of hours running pg_upgrade I had to give up.
>> >
>> > looking a iotop I was seeing
>> >
>> > 99% IO load caused by [md0_raid1]
>> >
>> > and only seeing pg_upgrade go to 99% every 3-4 seconds
>> >
>> > I had no other processes using io or high cpu.
>> >
>> > Has anyone got any pointers of what could be the issue ?
>> >
>> > Ps running cp on /var/lib/pgsql/9.5/data/base/24602/25140 to my
>> home
>> > directory is instantaneous
>> >
>> > System is Centos 7
>> >
>> > Thanks
>> >
>> >
>>
>>
>> -- Adrian Klaver
>> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2019-10-03 13:46 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 22:30 performance of pg_upgrade "Copying user relation files" Glenn Pierce <glennpierce@gmail.com>
2019-10-02 23:11 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-10-03 00:47 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-10-03 13:46 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-10-02 23:16 ` Adrian Klaver <adrian.klaver@aklaver.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox