×

Search anything:

How Speed Test Work?

Binary Tree book by OpenGenus

Open-Source Internship opportunity by OpenGenus for programmers. Apply now.

In this article, we have explored how Internet Speed is measured which involves upload and download speed. This will help you understand how speed test by Ookla works and how you can create a similar tool to measure Internet Speed.

Table of Contents:-

  1. What is Speed Test?
    • TCP Test Components
    • HTTP Legacy Fallback Testing
  2. Factors That Affects Speed Test
  3. Why Should I Test My Internet Speed?
  4. Acceptable Latency
  5. Conclusion

Speed-test
- Sample Speed Test

What is Speed Test?

Speed Test is a way to measure the speed between a device and a test server employing the device internet connection. However there are some defining factors that can influence the latency rate, which includes the type of device i.e : Phones, PCs, tablets and others. The aformentioned devices have very unique Wi-Fi and cellular radio proficiencies. In conclusion speed test employs TCP testing with a HTTP fallback for utmost affinity. Additionally speed test assess ping (latency), the download speed and upload speed of a device.

TCP Test Components

Latency/Jitter

This type of test is implemented by calculating the time it takes the server to reply the resquest sent by the user's device/client The client sends a message to the server, after receiving the message, the server sends a reply back. The round-trip time is measured is measured in ms (milliseconds).

This is replicated as many times as possible with the lowest value deciding the final outcome.

Download

  1. The client at first initiate numerous connections with the server at port: 8080. The client behest the server to send an inceptive mass of data.
  2. The client work out the real-time speed of the transfers, then regulates the mass size and buffer size in relation to the calculation to augment usage of the network connection.
  3. Just as the mass are received by the device, the device will demand more mass all through the period of the test.
  4. During the intial stage of the test, the device in operation will initiate additional connections to the server if it establish an additional threads are needed for an accurate measure of the download rate.
  5. The perfomred check stops at the point that the configured amount of time has been attained.

Upload

  1. The client initiate numerous connections with the server over the defined port and sends a preliminary mass of data.
  2. The client evaluate the real-time rate of the transfers and adjusts the mass size and buffer size based on it to boost usage of the network connection, and request for more data.
  3. As soon as the mass are received by the device, the device will demand more mass all through the period of the test
  4. During the intial stage of the test, the device in operation will initiate additional connections to the server if it establish an additional threads are needed for an accurate measure of the upload rate
  5. This will stop as soon as the configured amount of time has been gained.

HTTP Legacy Fallback Testing

Latency

  1. HTTP Legacy Fallback Test is carried out by measuring the duration it takes to get response for a HTTP request sent to the web server.
  2. Test is performed numeorus times with the lowest value shaping the final result.

*Download

  1. Small binary files are downloaded from the web server to the client to evaluate the connection speed.
  2. Relying on the result , one of the assorted file sizes will be chosen for use in the real download test.
  3. HTTP Legacy Fallback Test is accomplished with cache prevention via random strings appended to each download.
  4. Throughput specimen are received at up to 30 times per second These specimen are then assembled into 20 slices (each being 5% of the specimen).
  5. The fastest 10% and slowest 30% of the slices are then dropped
  6. The unsettled slices are averaged together to determine the final result.

Upload

  1. A piece of random data is created in the client and sent to the web server to estimate the connection speed.
  2. In accordance with the establised result, a suitable sized mass of arbitrarily created data is sort out for upload.
  3. The upload test is then performed in mass of unvaried proportions, sent to the server-side script via POST.
  4. Up to four HTTP threads will be used to saturate the connection.
  5. Mass are sorted by speed, and the fastest half is averaged to eliminate anomalies and produce the outcome.

Deciding the number of threads for testing Internet Speed

A standard Speed test tool will make use of up to four (4) http threads in the course the download and upload part of the test. Nevertheless, it will only use more than two threads if they are neccessary to precisely determine the speed, in order to reduce the effect of HTTP overhead on lower-speed connections.

After the preliminary test, if the connection speed is at least 4 megabits per second, then the tool will use four threads. Or else, it will resort to two threads.

With older browser like Internet Explorer 7 and earlier versions of Firefox (Firefox 2 and earlier versions) the browser strictly rigorously stick to the HTTP specification of only two threads per d3dvFor older browsers, to scale up to four(4) threads this means the third and fourth thread will be opened to a secondary URL which is provided by the host that points to the same server. Using this method we can work around the constraint of older browsers and determine the higher speed connections precisely. Modern browser hosts have a working secondary URL, However if the test is perfomred from an older browser to a host that doesn't, Speedtest.net will be limited to two threads at maximum. This is why its advisable to have an udated browser.

Factors That Affects Speed Test

Bandwidth-spectrum

  • Devices; They mostly have very non-identical Wi-Fi and cellular radio proficiencies. This subsequently result in getting a speed test outcome on one device and a different outcome on the other. The speed test does not rely Internet Service Provider(ISP) . The Wi-Fi router may not aid the full speed of your service.
  • Servers; Speed test servers may perform adversely. More oftne than not, the proximity of the servers to the device will produce faster speed. It advised testing to a variation of test servers to get the best outcome of your speed. Moreover speed testing services use different servers in different locations so differences in speeds between testing services are not uncommon.
  • Browsers; This include Chrome, Firefox, Edge, Safari, etc… have contrasting aptness and most likely provide different results, especially on high-speed connections.

Why Should I Test My Internet Speed?

Traditional speed tests evaluate yield, it is principal to measure Internet quality of your connection. Your ISP(Internet Service Provider) can use old copper connections and others dispathc your service through fiber optic connectivity. These, and considering other factors, may impact latency, jitter and packet loss. And, these affect your bandwidth quality.
Subject to the fact maybe you are using your internet connection for VoIP, video conferencing or an all-important applications, you may need a higher quality service. Speed test does this for you and helps highlight potential risks to your business.

Acceptable Latency

latency

Using an Online Game as a case study. Have you ever noticed that an oppossing player always seems to have the jump on you? This maybe as a result of the player having a faster ping(latency). In general, an acceptable latency (or ping) is anywhere between 40 – 60 milliseconds (ms) or lower, while a speed of over 100ms will usually mean a noticeable lag in gaming. Below is a guideline:

Winning: 0-59 ms
In the game: 60-129 ms
Struggling: 130-199 ms
Game over: 200+ ms

But for general browsing and streaming, anything under 100ms is fine.

Conclusion

With this article at OpenGenus, you must have the complete idea of how Internet Speed test works.

You can run a speed test on the internet. According to Google to run the test, you'll be connected to Measurement Lab (M-Lab) and your IP address will be shared with them and processed by them in accordance with their privacy policy. M-Lab conducts the test and publicly publishes all test results to promote Internet research. Published information includes your IP address and test results, but doesn’t include any other information about you as an Internet user.

How Speed Test Work?
Share this