Top Banner
Optimisation across networks Dyalog User Conference 18 th October 2012 Paul Grosvenor Managing Director
28

Optimisation across networks Dyalog User Conference 18 th October 2012 Paul Grosvenor

Feb 23, 2016

Download

Documents

Yi-Ching Yeh

Optimisation across networks Dyalog User Conference 18 th October 2012 Paul Grosvenor Managing Director. Insert image here. In this conference we have talked about parallel processing, code optimisation, interpreter improvements etc. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Optimisation across networksDyalog User Conference18th October 2012

Paul GrosvenorManaging Director

Page 2: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Insert image here

Page 3: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

In this conference we have talked about parallel processing, code optimisation, interpreter improvements etc.

Speed is clearly an important feature of our daily lives

We have spent little time looking at the infrastructure that all our codes inhabits

Page 4: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

So why am I even talking on this subject today ?

Because often we do not give proper consideration of the impact of our

application on the network

Page 5: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

So let us look at some very basic scenarios

Page 6: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor
Page 7: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor
Page 8: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor
Page 9: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Common misconceptions

• The Server is always up• The server is dedicated to me• The server has no space limitations• The network bandwidth is infinite• The client computers are really, really fast• The network has zero latency• We have perfect Infrastructure

Page 10: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Infrastructure

Page 11: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

January 2011

Page 12: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

March 2011

Page 13: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

June 2012

Page 14: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

fExist 'D:\APL\MyFile.DCF'1 'D:\APL\MyFile.DCF' ftie 0⎕FILE NAME ERROR: Unable to open file ("The system cannot find the file specified.") 'D:\APL\MyFile.DCF' FTIE 0⎕ ∧ fExist 'D:\APL\MyFile.DCF'0 'D:\APL\MyFile.DCF' ftie 0⎕1

So what ?

Page 15: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Excerpts from MSDN

Be aware that in some cases Explorer looks at the metadata of each file in a folder when you open a folder, which requires a read of each and every file within it.

Page 16: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Excerpts from MSDN

2,000-3,000 files [in a directory] is the limit of my patience

Page 17: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Excerpts from MSDN

The core Windows API is highly optimized for this basic scenario, and returns these attributes by default along with the rest of the file information. However, the .NET Framework doesn’t take advantage of this data, and instead goes back to the network location to ask for all of the file attributes. This chatty behaviour adds a handful of network round trips for each file or directory, making the directory listing many times slower: hundreds or thousands of times slower in many cases. The Framework team addressed this as part of .NET 4.0.

Page 18: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

0 50000 100000 150000 200000 250000 300000 350000 4000000

500

1000

1500

2000

2500

0 50 100 150

300 350

500

1250

2250

DirectoryInfo.GetFiles Method performance

DirectoryInfo.GetFiles()

Page 19: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Problems at the speed of light

• A satellite in geosynchronous orbit imposes a path length of at least 71000 km between transmitter and receiver. This leads to a minimum latency of 473 ms

• NASA’s deep space network has latencies measured in minutes

Page 20: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Goodput vs Throughput

• The number of useful bits of information transmitted at the application level over time

• In June 2001 Zona Research showed that an interaction delay of more than 8 seconds (over the internet) became rapidly intolerable

• IBM suggested a typical GUI response of under 4 seconds to be acceptable depending upon the application (I think)

• These days a user would expect sub 1 second response

Page 21: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Transmission overhead

• Channel speed 100Mb/s• Max packet size 1500 bytes + 26 bytes • 20 bytes IP header• 20 bytes TCP header• 12 byte time stamp (Unix, Linux, Mac)• Leaving 1460 bytes per packet available• Goodput = 1460 / 1526 x 100 = 95.6Mb/s

So we lose 5% before we even start

Page 22: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Now what ?

• Collisions• Lost packets• Packet re-transmission• Interframe gap• Packet queuing delay• Flow control• Processing delay• Congestion avoidance

Page 23: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Oh my god – What else ?

• Security protocols on the server• Updates on client machine• Updates on server machine• Signal / noise ratio

The list just keeps going on …

Page 24: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

The reality is that unless you have very specialised equipment running

in ideal environments you will be lucky to achieve a Goodput better

than 70% of expectations

Page 25: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

So what can I do

• Never forget your expected infrastructure limitations

• Avoid deep directory structures• Keep the files in a single directory to a sensible

number (experiment)– 1,000 fine– 10,000 probably OK– 100,000 probably not

Page 26: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

So what can I do

• Consider file size; a number of smaller files may perform better than a single large file

• Reduce junk traffic• Remember that other people use your server

as well• Simplify your security structure if you can– Application level not directory or file level

Page 27: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Your server and network are analogous to a heart and vascular system

Look after them, treat them with respect, and hopefully they will look

after you

Page 28: Optimisation  across networks Dyalog  User Conference 18 th  October 2012 Paul Grosvenor

Thank YouContact us:Optima House, Mill Court,

Spindle Way,

Crawley,

West Sussex RH10 1TT

Tel: 01293 562 700

Fax: 01293 562 699

[email protected]

www.optima-systems.co.uk