Website Speed Optimization
Internet Connection Test
There are two sides wher you have to test internet connection.
- client-side speed test (your home PC, laptop, tblet or mobile device)
- server-side speed test
1. Client-side speed test
Just do some google search for test internet connection speed .
Currently the best service to measure your home internet speed is http://www.speedtest.net/ .
Also good service is: http://speedtest.comcast.net/ .
2. Server side speed tests
LATENCY SPEED - PING
Ping is a command line tool and is used to determine the distance to remote server. It sends a package of data to the remote IP address and waits that data to be returned back. The lower time is, the remote machine is close to us.
# ping -a 95.178.194.238
PING 95.178.194.238 (95.178.194.238) 56(84) bytes of data.
64 bytes from 95.178.194.238: icmp_seq=1 ttl=56 time=62.8 ms
64 bytes from 95.178.194.238: icmp_seq=2 ttl=56 time=64.4 ms
Notice that PING time can be converted in kilometers if we take into consideration that electromagnetic wave travels with 200*10^6 m/s through optical fibre.
See the article http://rescomp.stanford.edu/~cheshire/rants/Latency.html .
UPLOAD & DOWNLOAD SPEED CONNECTION
Install speedtest-cli command line tool which uses speedtest.net infastructure.
Github: https://github.com/sivel/speedtest-cli
CentOS 6.5 installation commands
a) #yum install python-pip
b) #pip install speedtest-cli
Now, to perform speed test use the command:
#speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Contabo GmbH (213.136.68.162)...
Selecting best server based on latency...
Hosted by Base-Mail (Frankfurt) [100.73 km]: 20.246 ms
Testing download speed........................................
Download: 83.25 Mbits/s
Testing upload speed..................................................
Upload: 30.74 Mbits/s
This command automatically find the closest speedtest.net server to perform speed testing.
Other speedtest-cli commands:
#speedtest-cli --list -lists all available speedtest.net servers
5666) Exetel (Sydney, Australia) [16432.15 km]
5744) Digital Pacific (Sydney, Australia) [16432.15 km]
2582) Australian Private Networks (Sydney, Australia) [16432.15 km]
2629) Telstra (Sydney, Australia) [16432.15 km]
#speedtest-cli --server 2582 -execute test via 2582 Australian Private Networks server
Hosted by Australian Private Networks (Sydney) [16432.15 km]: 421.236 ms
Testing download speed........................................
Download: 24.02 Mbits/s
Testing upload speed..................................................
Upload: 5.62 Mbits/s
Conclusion:
I have to mention tha my Contabo server is located in Germany. As you can see there will be significant speed drop down for Australian users. So when designing web pages you have to take into consideration those minimum speeds.
Hmm, maybe to take some software on my client-side to simulate low speed internet connection???