Re: [HACKERS] Slow I/O can break throttling of base backup

2016-12-19 Thread Magnus Hagander
On Fri, Dec 16, 2016 at 11:24 AM, Antonin Houska wrote: > Antonin Houska wrote: > > > It seems to be my bug. I'll check tomorrow. > > I could reproduce the problem by adding sufficient sleep time to the > loop. > > > Magnus Hagander

Re: [HACKERS] Slow I/O can break throttling of base backup

2016-12-16 Thread Antonin Houska
Antonin Houska wrote: > It seems to be my bug. I'll check tomorrow. I could reproduce the problem by adding sufficient sleep time to the loop. > Magnus Hagander wrote: >> I wonder if the else if (sleep > 0) at the bottom of throttle() should just >> be a

Re: [HACKERS] Slow I/O can break throttling of base backup

2016-12-15 Thread Antonin Houska
It seems to be my bug. I'll check tomorrow. Magnus Hagander wrote: > Running pg_basebackup with a throttling of say 10M runs it into the risk of > the I/O on the server actually being slower than pg_basebackup (I have > preproduced similar issues on fake-slow disks with

[HACKERS] Slow I/O can break throttling of base backup

2016-12-15 Thread Magnus Hagander
Running pg_basebackup with a throttling of say 10M runs it into the risk of the I/O on the server actually being slower than pg_basebackup (I have preproduced similar issues on fake-slow disks with lower rate limits). What happens in this case in basebackup.c is that the value for "sleep" comes