Обсуждение: Network performance optimization

Поиск
Список
Период
Сортировка

Network performance optimization

От
"J . Mageshwaran"
Дата:
Hi Team, I am performing some benchmark testing with application in aws east 2 and dB in East 1. I am using pgbench for benchmark, the RTT Latency between East 1 to east2 is some where between 12 to 16 ms on an average. Is there any optimization that can be done to reduce the latency and increase the throughout to the PostgreSQL layer?

Re: Network performance optimization

От
Fabio Pardi
Дата:
Hi,

use of a connection pooler usually helps in such cases. It will not reduce latency, but it will mitigate the problem when the app can benefit from recycling the connections.

regards,

fabio pardi


On 09/09/2020 06:59, J . Mageshwaran wrote:
Hi Team, I am performing some benchmark testing with application in aws east 2 and dB in East 1. I am using pgbench for benchmark, the RTT Latency between East 1 to east2 is some where between 12 to 16 ms on an average. Is there any optimization that can be done to reduce the latency and increase the throughout to the PostgreSQL layer?

Re: Network performance optimization

От
Fabio Ugo Venchiarutti
Дата:
On 09/09/2020 04:59, J . Mageshwaran wrote:
> Hi Team, I am performing some benchmark testing with application in aws 
> east 2 and dB in East 1. I am using pgbench for benchmark, the RTT 
> Latency between East 1 to east2 is some where between 12 to 16 ms on an 
> average. Is there any optimization that can be done to reduce the 
> latency and increase the throughout to the PostgreSQL layer?

Even if network datagrams moved at the speed of light and with no 
serialisation/forwarding delay (which they don't), you're still going to 
deal with several thousand KMs of distance; I'm positively surprised 
you're getting such short round-trip times as it stands.


If you have any control over the application code, IMO your best shot is 
to coalesce DB interactions into as few smarter DB queries as you can 
for each higher order operation (eg: RESTful API calls), as you'll be 
paying for that fixed RTT overhead for each command.




-- 
Regards

Fabio Ugo Venchiarutti
OSPCFC Network Engineering Dpt.
Ocado Technology

-- 


Notice: 
This email is confidential and may contain copyright material of 
members of the Ocado Group. Opinions and views expressed in this message 
may not necessarily reflect the opinions and views of the members of the 
Ocado Group.

If you are not the intended recipient, please notify us 
immediately and delete all copies of this message. Please note that it is 
your responsibility to scan this message for viruses.

References to the 
"Ocado Group" are to Ocado Group plc (registered in England and Wales with 
number 7098618) and its subsidiary undertakings (as that expression is 
defined in the Companies Act 2006) from time to time. The registered office 
of Ocado Group plc is Buildings One & Two, Trident Place, Mosquito Way, 
Hatfield, Hertfordshire, AL10 9UL.



Re: Network performance optimization

От
Francisco Olarte
Дата:
Fabio:

On Wed, Sep 9, 2020 at 1:05 PM Fabio Ugo Venchiarutti
<f.venchiarutti@ocado.com> wrote:
> Even if network datagrams moved at the speed of light and with no
> serialisation/forwarding delay (which they don't), you're still going to
> deal with several thousand KMs of distance; I'm positively surprised
> you're getting such short round-trip times as it stands.

Light travels at about a foot per nanosecond in air/vacuum, 20 cm per
nanosecond in glass IIRC, so you can RTT 10cm per nanosecond in fiber.
This amounts to 100km per millisecond. 1200 to 1600 km in 12-16 ms.
East-1/2 are N.Virginia / Ohio, which can be from 240 to 950 km apart
( on a quick google maps measure, not several thousands ), depending
on the exact place. And Amazon has really fast pipes going between
their regions, so this is not surprising. I have 55ms from ireland (eu
west 1) to N.Virg., and they are 5500 km over the great circle.

Francisco Olarte.