Giter Site home page Giter Site logo

librespeed / speedtest Goto Github PK

View Code? Open in Web Editor NEW
11.2K 268.0 2.1K 6.64 MB

Self-hosted Speed Test for HTML5 and more. Easy setup, examples, configurable, mobile friendly. Supports PHP, Node, Multiple servers, and more

Home Page: https://librespeed.org

License: GNU Lesser General Public License v3.0

HTML 7.94% PHP 53.59% JavaScript 33.96% Dockerfile 0.81% Shell 3.06% TSQL 0.63%
html5-speedtest speedtest web-worker xhr internet-speed internet-speed-checker php librespeed hacktoberfest

speedtest's People

Contributors

adolfintel avatar anoymouserver avatar bierpub avatar bjonn avatar brahmlower avatar bt90 avatar burned42 avatar colorvamp avatar coneslayer avatar jokneemo avatar ke-mccormick avatar kodaihirano avatar merdely avatar mildis avatar mserve avatar nielspeen avatar perflyst avatar peterdavehello avatar raidandfade avatar rizlas avatar scg82 avatar slawka avatar sstidl avatar stefanstidlffg avatar thgoebel avatar toomuchio avatar tracy-b avatar victor-d avatar xpaw avatar zhangsean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

speedtest's Issues

Server without php

Hi there,

Ive installed your project onto a server that does not have php installed. I have literally just installed it as described in the doc, without any modification.

It seems to work fine, I get test results. Does this mean that my results are not correct?

Am I required to do any of the "without php" steps?

Thanks

ISO: Help (Have a similar project)

Been trying to find a easy way to get a user's upload speed, I have a project that measures users internet speeds - Its Called SpeedTest as well (Long Name : BeffsBrowser's SpeedTest Project)

Mind giving a hint on how to get a users upload speed? I read through your code, but some of it isn't easy to understand plus, mine is hosted here on github, so it is impossible to use php files.

You can see the project's Source Here

And use it here

I think it would be pretty simple but, simply don't know. Currently I use a image on a seperate respo - to test the user's download speed, and now I am looking on how to do the same or similar to get a users upload speed.

Thanks!

P.S.

Other than it uses php and other unfamilar stuff to myself, it is a good project, but has some flaws.

WIP: Serious issues with Firefox 51

Some weird shit is going on with Firefox 51, with negative download speeds, the upload test that never ends, and the ping test completely broken.

I'll do my best to figure out what's going on here.

Upload Not Working

Can you advise on where to check in apache for issues with the HTTP Post? I'm a bit of an apache amateur and having trouble finding where I can set the file. Everything works great except for the upload.

Packet Loss

Hello! I love this project, keep it up! The only thing that I missing, would be Packet Loss. Thank you.

I suspect that the measured values are inaccurate

I know I have 300 Megabits/second a symmetric network channel.

This web provides me real values:

image

whereas your web provides me unrealistic ones:
image

Upload and download speeds are very different.

The difference between Megabyte and Megabit is a factor of 8.

Speedtest.net, provides this result:
image

So, I don't rely the results offered by this code.

Progress bar feature

Hello,

First of all, thank you for the nice program.
Did you think about implementing some tiny download/upload progress bar and speed graph in the bottom?

getIP.php is not retrieving the IP address and no jitter values are fetched!

Hi Adol,

I have tried testing this code in my test environment (Oracle Linux 6.9)
it is not providing me the IP address of the server
Error: Your IP: <?php echo $_SERVER['REMOTE_ADDR']
Jitter values are not populating at all.:
tester

Jitter
?>
ms

download, upload and ping test works like a charm but not the jitter value and IP option. Please advise.

Bad results with high speed connections (Duplicate of #13)

This seems to be similar to issue #13, but I experienced no crashes, so I open a new issue.

I'm testing with Chromium 56.0.2924.76 Built on 8.7, running on Debian 8.7 and Mozilla Firefox 45.7.0. The server is connected via gigaethernet. On FF, download speed initially reaches high values, but slows down at about ~50MB and ends showing a speed of a few MBs. It may depend on the number of open tabs I have. On Chromium, it shows a few hundres Mb/s.

I tried to stop the test before memory is hogged, see speedtest_worker.patch.txt. That way I get 161.74 Mbit/s on FF, 260.10 Mbit/s on Ch. Upload is, respectively, 549.38 Mbit/s and 266.96 Mbit/s, so measured values are about 1/2, 1/4, and 1/8 of nominal speed; I don't think they could get much better than that...

Chart - Latency

Hello,
first of all thanks for this beautiful tool.

When I run the chart example, the latency chart looks very strange. It happens that I have just two points (red and green) or two lines. Is it normal?

2017-07-14_111112

Download test no completed

When running the test the upload and ping work but the download does not, tried using a 500mb (empty.dat) and still no luck

Results are higher than maximum possible.

I have noticed, that test result I get are higher, than can be.
My PC is in 100Mpbs port. Maximum I can get is 98 Mbps, it's phisical limit, no more.
But in this test I get 102 Mbps both download and upload - it's greater than port capability!.
I have checked Apache and php configuration - all compression is disabled;

$ cat httpd.conf | grep defla
#LoadModule deflate_module libexec/apache24/mod_deflate.so

$ cat httpd.conf | grep zli - no result

in garbage.php i have directives:

Good tool, but not precise enough

Hello,
My little report... ;)
The calculated ping seems too high. (33 with Ookla, 49 with this one)
The upload seems underestimated. (3.36Mpbs with Ookla, 1.61Mbps with this one)
Only the download seems correct (28.18Mbps with Ookla, 26.35Mbps with this one)
I administer a local speedtest server for ookla, and I put this tool on a different server but the same network (same switch)
The tests were performed at 30 seconds intervals on a VDSL or I was the only user at that time and without wifi.

Not able to change the order of download, ping, upload tests

The default order of tests in the js file is - Download, Ping, Upload. But I want to make Ping, Download and Upload. I changed this code getIp(function(){dlTest(function(){testStatus=2;pingTest(function(){testStatus=3;ulTest(function(){testStatus=4;});});})}); as getIp(function(){pingTest(function(){testStatus=3;dlTest(function(){testStatus=2;ulTest(function(){testStatus=4;});});})}); but than download and upload tests are not working. How to achieve this change of order?

A way to reduce the amount of requests and the transferred MB?

Hello. For comparison reasons, I created 3 different speed tests using JS libraries. My first implementation was done by using Nettest. My second implementation was done by using Boomerang and the third implementation was done by using your method. In every implementation, when the test is finished, I send the calculated measurements back to my server.

By using Nettest the requests and the transferred MB are:
nettest

By using Boomerang the requests and the transferred MB are:
boomerang

By using your method the requests and the transferred MB are:
speedworker

Question:
Is there a possible way to reduce the size of the transferred MB without affecting the accuracy of the measurements calculated by your method?

Thank you.
@adolfintel

Firefox does not handle ping well.

Ping on FireFox is coming up 100 to 200 ms.
On Chrome the script seems to run very quickly and accurate at 20 to 30 ms.

Seems more like a browser issue, but is there something that can be optimized?

ping time wrong

Hi,

Great script!.
On our cpanel server the ping time is wrong for some reason. Its around 76ms whereas it should be around 12ms from my home. Jitter seems fine at around 11ms.
I have enabled the keep alive header..Any help would be appreciated :)

Regards,

Bela

Test Queue Feature

Is it possible to set up a feature to limit simultaneous tests? Setting up a queue or something like this..

Thanks in advance! Your tool is awesome!

Pass values out of function(event){}.

Hello. You have created a really nice speed test. Is it possible to pass the download speed, ping & upload speed final values out of the function(event)? And if so how can i achieve that? I want to send these final values to my server using an ajax post method.

I'm able to send these values using an ajax post method inside the function(event){} but it keeps sending these final values to my server over and over again . If i can't pass the values out of the function(event){}, how can i stop it from running for ever?

Thank you.

@adolfintel

false result

Hello, i tried your speedtest apps on our server. I got strange result:
download 2 mbps
upload 69 mbps

and when using a different webrowser on the same computer i got totally different result.

Speed test reports negative value

When running the examples I get a negative value when on a VM that is on the same host. (eg: it reports -28836.32Mbit/s) and a upload speed of zero. This is testing with example2.html

The speeds it reports in the interim seem accurate and around 300-500Mb/s.

The example4 returns other more inaccurate numbers such as -729.57Mbit/sec and a ping time of almost 90ms.

About Ping values

Hello, I'd like to consult the Ping value problem. I tested a lot of servers and found that the CMD Ping value is 2 times the Ping value in the web page test results.
Is the Ping value tested in the web program accurate? Or is there a solution?

Here are some pictures:
Page Ping:http://imgur.com/PQgu2OS
CMD Ping:http://imgur.com/6ivYXFc

Is there some way to make the upload test run longer?

Is there some way to make the upload test run longer? When testing on a 200/200 Mbps connection the upload test runs too fast (it ends within a second or two of starting) not giving enough time to ramp up.

Also wanted to report two other issues;

Under iphone browser upload test is inaccurate showing 300 Mbps+ on a connection with only 10 Mbps.
Ping test seems inaccurate no matter the browser or system using example4.

Unexpected low dowload speed

Hello!
I have downloaded speedtest from here https://github.com/adolfintel/speedtest.git
I have apache 2.4+ PHP Version 5.4.37.
I see, that download speed is extremely low, like 0.7-0.9 Mbps.
Code from gitup were copied to server as is, no chages yet.
empty.php, garbage.php accessible, no errors in browser console, when I run test, only message:
"
Object { time_ul: 15, time_dl: 15, time_ulGraceTime: 3, time_dlGraceTime: 1.5, count_ping: 35, url_dl: "garbage.php", url_ul: "empty.php", url_ping: "empty.php", url_getIp: "getIP.php", xhr_dlMultistream: 10, ещё 6… }
"
I'm sure in my line speed. When I run http://speedtest.fdossena.com/, I get 65 Mbps download speed.

What shoud I check (change) in my Apace or Php settings?

Editing speedtest_worker.js settings don't apply

So I couldn't work out why I was unable to increase or decrease threadcounts, nor change chunk sizes, then when I started checking the actual requests getting sent - chunksizes don't change when changing the value away from 20. I've turned on/off quirks, forced fetch api on/off, no difference.

edit: None of the values in settings work at all. Adjusting time to 2 seconds has no effect. have restarted browser just incase.

Something broken?

Request: Send results

Could I convince you to make an example with a "Send Results" button? This would be great for troubleshooting purposes.

PHP Fatal error: Only variables can be passed by reference on line 18

Not sure why this works for you at all - maybe different php version.
18 $data=openssl_random_pseudo_bytes(1048576,false);
I'm guessing you are trying to turn "strong encryption" off to conserve resources... but that's not what that parameter does (the wording of the documentation is a bit confusing there - for php7 at least: it's not a setting, just a variable that will tell you afterwards, whether the string you got is suitable for use in encryption etc or if your openssl is too old/broken)...

Crashes and issues with very fast connections

Tried your test server using Firefox 50.1.0 on Fedora 25 and it reaches around 8.5Mbit then freezes the browser maxing out the CPU. After a while Firefox reports the tab has crashed and the PC is responsive again.

NEED A MAINTAINER!

I'm looking for someone who can help me maintain this project, at least for a couple of months.

As a maintainer you will have full access to the project, and you will have to

  • Respond to requests and issues. Typically it's just people who need help setting up the speedtest on their server. 1-2 every day on average
  • Implement minor changes, like adding small features or fixing bugs

I will be available to assist you, but I'll be working on a new project that will be done by the end of september.

If you'd like to help, please answer to this issue or write me at [email protected]

SSL?

Curious if running this over SSL would affect the measured speed?

Issues with garbage file

Hi,

First of all, thanks for your bandwidth tester that I use since last week.

I tested on several environments :

1)Linux Ubuntu(64) client, CoreI processor, at least 8Gig of ram with Chrome and Firefox (Internet direct access)

2)Windows 8.1(64) Client , Core2Duo processor, 2Gig of ram with IE11 and Chrome. (behind proxy)

I got some problem with your garbage file.

If I let the speed tester use the garbage.php file on any machine:

-With the previous release of your speed tester:
-Download speed never went above 0.7kbps (even in local network)
-Upload and Latency seems to be OK

-With last release:
On linux machines:
-Chrome crash after the download.
-Firefox slowdown the client PC as hell in download phase, needed to reboot.

On Windows Machines:
-IE or Chrome slowdown the client PC as hell in download phase, needed to reboot.

If I do a symlink do /dev/urandom (with command : ln -s /dev/urandom /var/www/speedtest-master/garbage.dat, and I replaced all references to garbage.php in garbage.dat in html and js files)on any PC and any browser, Download always get 0.00 mbits/s

If I generate a garbage.dat file with dd if=/dev/urandom of=/var/www/speedtest-master/garbage.dat count=10240 bs=1024. It seems to be ok for any browser on any machine.

But for very slow internet connection, download a 10MB file can be very long, that's why i'm interested by a working live generated garbage file.

One question: does the given results are the very last obtained value or the average speed?

Cheers

Proc.

Accuracy when latency is high

Hi,

Seems latency and jitter measurements are not correct. At least not when testing over high latency.

Below are examples where the ping RTT is 260ms.

Older version speedtest:

Latency 205.30ms, 123.30 ms jitter

Latest version:

Latency 424.31 ms, 251.06 ms jitter

Browser:
Version 59.0.3071.104(64 bitar) Windows 7
Server: CentOS 7 with Apache

Use releases

I would suggest you start doing releases. It makes your management really easy.

Once you have a stable milestone, do a release.

Sharing my initial config

This is not an issue. I'm just sharing my initial config for ubuntu 16 LTS

> sudo apt-get install apache2 php libapache2-mod-php php-mcrypt

# KeepAlive on Apache
> more /etc/apache2/apache2.conf | grep "KeepAlive On"
  KeepAlive On

# Modify PHP
> sudo more /etc/php/7.0/apache2/php.ini
  ...
  max_execution_time = 90
  max_input_time = 90
  memory_limit = 128M
  post_max_size = 50M
  upload_max_filesize = 50M
  ...

# Modify TCP  
> sudo more /etc/sysctl.conf  
  ...
  net.core.wmem_max = 16777216
  net.ipv4.tcp_window_scaling = 1
  net.ipv4.tcp_rmem = 4096 87380 16777216
  net.ipv4.tcp_wmem = 2096 65535 16777216
  net.ipv4.tcp_mem = 98304 131072 196608
  net.core.netdev_max_backlog = 250000
  net.ipv4.tcp_timestamps = 1
  net.ipv4.ip_local_port_range = 1025 61000
  net.ipv4.tcp_congestion_control=htcp
  ...
> sudo sysctl -p

# Transmit Queue Length
# Add at then end
> nano /etc/rc.local
  /sbin/ifconfig eth0 txqueuelen 10000

> ifconfig
  eth0   Link encap:Ethernet  HWaddr fa:b5:d4:b7:8f:1e
            inet addr:xxx.xxx.62.103  Bcast:xxx.xxx.62.255  Mask:255.255.255.0
            inet6 addr: fe80::f8b5:d4ff:feb7:8f1e/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:298 errors:0 dropped:15 overruns:0 frame:0
            TX packets:87 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:10000
            RX bytes:36593 (36.5 KB)  TX bytes:17182 (17.1 KB)

Riccardo

List of (non-)supported browsers

It would be nice to have a list of the versions that don't support the speedtest. So that I can block these browsers for reaching the speedtest. In this way they don't get to a speedtest that doesn't work on the browser that they are using.

Results database

It is necessary to make, that after the test, it was caused done.php, with send in it of results (date,IP, etc).

Results slightly high

This issue is very close to #12

However, my experience is that the results are too high as shown below

This is the baseline test, from the same datacenter, Notice about a 1-2MBIT difference in the download and about 30ms difference in the ping which is relevant because the servers are in the same datacenter.

Baseline

If my connection was capable of 8MBIT i wouldn't question it, but I've never been able to get 8MBIT from this particular connection, so something seems off to me.

Sometimes the speed test will show even higher results 8.5-9MBIT
speedtest

Firefox false upload speeds

Firefox (tried multiple forks with no addons) is reporting an unrealistic upload speed ~ 4,000 mbps, where it's really 20mbps. http://speedtest.fdossena.com/ reports it realistically as 20mbps, and chromium browsers work on my site as well.

Below is the default headers for my site:
HTTP/2 200 server: nginx/1.10.3 (Ubuntu) date: Wed, 23 Aug 2017 12:37:44 GMT content-type: text/html content-length: 1316 last-modified: Wed, 23 Aug 2017 11:54:36 GMT etag: "599d6cfc-524" strict-transport-security: max-age=15768000; includeSubdomains; preload x-content-type-options: nosniff public-key-pins: pin-sha256="5xicsR/qwEJYfXChLoj5ABGYCdoIa9oCMKG7XTajeqI="; pin-sha256="bYL9lnto8Jb2RXnnbZwISleJe+cW+PHJC80YTGupOcc="; pin-sha256="sRHdihwgkaib1P1gxX8HFszlD+7/gTfNvuAybgLPNis="; pin-sha256="YLh1dUR9y6Kja30RrAn7JKnbQG/uEtLMkBgFF2Fuihg="; pin-sha256="C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M="; max-age=15552000; x-xss-protection: 1; mode=block content-security-policy: img-src *; referrer-policy: no-referrer x-frame-options: allow accept-ranges: bytes
I'm using Let's Encrypt for TLS, with a very minimal nginx setup.

https://uif.sexy/speedtest/example1.html

Better documentation?

Hi, I would really like to implement this as a alternative to speedtest mini, however I'm not really that good with linux and I found 0 documentation?

Would the dev be willing to release commands to copy/paste or just general documentation on how to install and run this in ubuntu 16.04 ?

Wildly Inaccurate Upload - Slower Connections

We've been testing this and have repeat reports from people on slower connections (1Mb up) that this is mis-reported by a massive amount.

My test line which is 1Mb up also, gives a result of 2.6Mb - which is impossible.

Any obvious cause for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.