What's new

OpenSpeedTest as an Addon

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

vlord

Regular Contributor
Currently, I run an openspeedtest server on a mac connected the router via 1GbE. This has some disadvantages including the obvious network limitations. I was wondering if anyone has looked into porting this over as an entware package / amtm option to run directly on the router?

 
Currently, I run an openspeedtest server on a mac connected the router via 1GbE. This has some disadvantages including the obvious network limitations. I was wondering if anyone has looked into porting this over as an entware package / amtm option to run directly on the router?

While it would be cool to do something like this, the specific setup on this github appears to be more of an "OS" level application. While it may be possible to run a speed test on a local router, this speed test server design looks better to run on a Debian or Ubuntu workstation, or even an RPI4. I would venture to say the router systems are not design for this type of application, but I am no expert on making these determinations. I am just reverberating words other professionals like @ColinTaylor , or @dave14305 might have said in the past when presented with "OS" level applications being ran on a router.

However, it does appear to show some comments about being able to run on LAN/WAN locations. ( You could probably configure this with an Openwrt Router easily.)


I still would venture to say you would have to install chrooted debian of some sorts. Even then it still might not 100 percent work because chrooted debian is a very neutered debian environment. Similiarly entware allows for users to install web server apps on their routers such as nginx, caddy, apache, and lighttpd, but the githubs headless deployment shows instructions for running it on docker.

This was the website I needed to see:

1685144282184.png


1685144121481.png


From what I can tell, these all look like "OS" level deployments, I may be wrong. I was hoping I would find a run-able binary of sorts.
 
Last edited:
Currently, I run an openspeedtest server on a mac connected the router via 1GbE. This has some disadvantages including the obvious network limitations. I was wondering if anyone has looked into porting this over as an entware package / amtm option to run directly on the router?

Don't run it on the router directly - you want to run this outside of the router...

As an alternative to OpenSpeedTest, which seems a bit overweight for an embedded device to host...


Runs fine on a RPi3...

There's always iperf/iperf3 for those who want a bit more control over things...

Screenshot 2023-05-26 at 5.05.47 PM.png
 
Don't run it on the router directly - you want to run this outside of the router...

As an alternative to OpenSpeedTest, which seems a bit overweight for an embedded device to host...


Runs fine on a RPi3...

There's always iperf/iperf3 for those who want a bit more control over things...

View attachment 50406
Thanks for sharing you expert input. It confirms my suspicions. It just shows that there are alot of cool things out there; however, it also confirms we spend alot of time pondering "what if this cool thing can run on my router".
 
Don't run it on the router directly - you want to run this outside of the router...

Why would you not want to run this on the router? My goal is to find the channel and settings that would provide the maximum performance. Seems like eliminating an external connection would be ideal. Sure I could setup an ftp server and perform a transfer to a client but a local speedtest server takes the headache out of that. I use to use librespeed but I found that it wasn’t transferring enough data to provide consistent results. Thanks for your feedback and input!
 
Why would you not want to run this on the router?
Unless you're running it on a high-end router I doubt the results would be accurate. Even running something simple like an iperf transfer on my RT-AX86U the router becomes CPU-limited in one direction and can't reach the maximum speed of a gigabit ethernet connection. Add to that the extra overhead in running and entire web server to support HTML5 and I imagine it would be even worse. If you don't care about accuracy but just want some relative ballpark numbers it might be good enough though.
 
Why would you not want to run this on the router?
As @ColinTaylor mentioned... any speedtest binary that runs on this router is as I've termed it, "for entertainment purposes only". I have the Ookla binary integrated into my RTRMON script, and even with this beefy GT-AX6000, I still can't get a true measure. It's all about hardware... and these routers just ain't got it.
 
Is it possible? Absolutely! If you have a router equipped with a robust CPU and ample storage capacity, you can proceed. Firstly, please note that the size of OpenSpeedTest is approximately 32MB. OpenSpeedTest contains Only STATIC Files like HTML,CSS & JS. All we need is a static web server like NGINX.
  1. Install Nginx.
  2. Download OpenSpeedTest Static Files.
  3. Extract it to www folder of your WebServer.
  4. Download Nginx configuration and copy it to Nginx Server Configuration folder.
  5. Reload or Restart Nginx.
Recently someone tested 10Gbps from a Mikrotik router.

Telstra Technicolor Device Example
 
Last edited:
Is it possible? Absolutely! If you have a router equipped with a robust CPU and ample storage capacity, you can proceed. Firstly, please note that the size of OpenSpeedTest is approximately 32MB. OpenSpeedTest contains Only STATIC Files like HTML,CSS & JS. All we need is a static web server like NGINX.
  1. Install Nginx.
  2. Download OpenSpeedTest Static Files.
  3. Extract it to www folder of your WebServer.
  4. Download Nginx configuration and copy it to Nginx Server Configuration folder.
  5. Reload or Restart Nginx.
Recently someone tested 10Gbps from a Mikrotik router.

Telstra Technicolor Device Example
Do you have any examples of anyone doing it on an Asus Router running Asuswrt-Merlin firmware?
 
@SomeWhereOverTheRainBow
In the near future, I plan to share a guide. It is essential to have Nginx as the sole requirement. Once you have successfully installed Nginx, you can proceed to download the Nginx config and SpeedTest files and place them in their respective folders.
 
@SomeWhereOverTheRainBow
In the near future, I plan to share a guide. It is essential to have Nginx as the sole requirement. Once you have successfully installed Nginx, you can proceed to download the Nginx config and SpeedTest files and place them in their respective folders.
That is pita, I only asked because I don't necessarily consider the cpu's in these routers to be robust. Most likely the average user will find the same "bottleneck" experienced with other speed testers also exist with this one as well. Not to say your product is bad, but it is the limitations of these routers CPU that I am more concerned with. Putting in all that extra work with nginx is definitely not ideal if the product is not necessarily going to be a game changer in comparison to using other methods.
 
I performed tests on my AC5300 router, and unfortunately, the results were not satisfactory. In comparison, my Raspberry Pi 4 Model B achieved impressive speeds of 950+ Mbps for both download and upload.

Under normal testing, the AC5300 router exhibited speeds of 650 Mbps for downloads and 950 Mbps for uploads. However, during a stress test lasting 60 seconds, the speeds improved slightly to 800 Mbps for downloads while maintaining the upload speed of 950 Mbps.
Screenshot 2023-05-27 at 9.34.46 PM.png



The single CPU core on the router was consistently occupied for a significant duration, which may be attributed to the limitations of the Armv7 architecture.

However, I remain confident that with a modern router, it is indeed possible to achieve the maximum speed effortlessly.
 
1) install Entware
2) opkg install nginx

3) Extract to /opt/share/nginx/html

4) nginx.conf to /opt/etc/nginx

NGINX:
worker_processes  auto;
worker_rlimit_nofile 100000;
user nobody;
events {
     worker_connections 2048;
     multi_accept on;
}
error_log  /var/log/nginx/error.log notice;                                               
pid        /tmp/nginx.pid;
http {
    include       mime.types;
    default_type  application/octet-stream;
    include /etc/nginx/conf.d/*.conf;
 
      
 
server {
server_name _ localhost;
        listen 3000;
       # listen 3001 ssl;
        listen [::]:3000;
        #listen [::]:3001 ssl;
        # If you like to Enable HTTP2 add "http2" to the above line.
        # If HTTP2 Enabled. Upload location should Proxy_Pass to http 1.1 port.
        # Otherwise you will see abnormal Upload Speeds.
        # Nginx Server Windows SSL Performance was very poor! Better use Linux if you need SSL support.
        #ssl_certificate  /etc/ssl/nginx.crt; # Use your own certificate & key
        #ssl_certificate_key /etc/ssl/nginx.key; # <-- key
        #ssl_ciphers         EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
        #ssl_protocols       TLSv1.1 TLSv1.2;
        #ssl_session_cache   shared:SSL:10m;
        #ssl_session_timeout 10m;
        root share/nginx/html;
        index index.html;
        client_max_body_size 10000M;
        error_page  405     =200 $uri;
        access_log off;
        gzip off;
        fastcgi_read_timeout 999;
        log_not_found  off;
        server_tokens off;
        error_log /dev/null; #Disable this for Windows Nginx.
        tcp_nodelay on;
        tcp_nopush on;
        sendfile on;
        open_file_cache max=200000 inactive=20s;
        open_file_cache_valid 30s;
        open_file_cache_min_uses 2;
        open_file_cache_errors off;
        
        location / {
            
            add_header 'Access-Control-Allow-Origin' "*" always;
            add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With' always;
            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
            #Very Very Important! You SHOULD send no-store from server for Google Chrome.
            add_header Cache-Control 'no-store, no-cache, max-age=0, no-transform';
            add_header Last-Modified $date_gmt;
                if_modified_since off;
                expires off;
                etag off;
            if ($request_method = OPTIONS ) {
            add_header Access-Control-Allow-Credentials "true";
            add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With' always;
            add_header 'Access-Control-Allow-Origin' "$http_origin" always;       
            add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
            return 204;
                }
            }
       #HTTP2 & HTTP3 will not wait for the post body and return 200. We need to stop that behaviour.
       #Otherwise, you will see abnormal upload speed. To fix this issue, Enable the following lines. (Only Applicable If you Enabled HTTP2 or HTTP3 in This Server.)
        
       #HTTP2 & HTTP3 -> UPLOAD FIX -- START
       #location = /upload {
       #proxy_pass http://127.0.0.1:3000/dev-null;
       #}
       #location = /dev-null {
       #return 200;
       #}
       #HTTP2 & HTTP3 -> UPLOAD FIX -- END
          
 #Caching for Static Files,
location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|woff2|svg)$ {
    access_log off;
    expires 365d;
    add_header Cache-Control public;
    add_header Vary Accept-Encoding;
    tcp_nodelay off;
    open_file_cache max=3000 inactive=120s;
    open_file_cache_valid 45s;
    open_file_cache_min_uses 2;
    open_file_cache_errors off;
    gzip on;
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
}
  
}
}

5) Create folder for logs /opt/var/log/nginx
6) Run Nginx

now visit your router ip : 3000
 
now visit your router ip : 3000
Couple of path errors in your nginx.conf:
error_log and pid are corrected here:
Code:
worker_processes  auto;
worker_rlimit_nofile 100000;
user nobody;
events {
     worker_connections 2048;
     multi_accept on;
}
error_log  /opt/var/log/nginx/error.log notice;                                               
pid        /opt/var/run/nginx.pid;

http {
    include       mime.types;
    default_type  application/octet-stream;
    include /opt/etc/nginx/conf.d/*.conf;
 
    server {
    server_name _ localhost;
            listen 3000;
           # listen 3001 ssl;
            listen [::]:3000;
            #listen [::]:3001 ssl;
            # If you like to Enable HTTP2 add "http2" to the above line.
            # If HTTP2 Enabled. Upload location should Proxy_Pass to http 1.1 port.
            # Otherwise you will see abnormal Upload Speeds.
            # Nginx Server Windows SSL Performance was very poor! Better use Linux if you need SSL support.
            #ssl_certificate  /etc/ssl/nginx.crt; # Use your own certificate & key
            #ssl_certificate_key /etc/ssl/nginx.key; # <-- key
            #ssl_ciphers         EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
            #ssl_protocols       TLSv1.1 TLSv1.2;
            #ssl_session_cache   shared:SSL:10m;
            #ssl_session_timeout 10m;
            root share/nginx/html;
            index index.html;
            client_max_body_size 10000M;
            error_page  405     =200 $uri;
            access_log off;
            gzip off;
            fastcgi_read_timeout 999;
            log_not_found  off;
            server_tokens off;
            error_log /dev/null; #Disable this for Windows Nginx.
            tcp_nodelay on;
            tcp_nopush on;
            sendfile on;
            open_file_cache max=200000 inactive=20s;
            open_file_cache_valid 30s;
            open_file_cache_min_uses 2;
            open_file_cache_errors off;
            
            location / {
                
                add_header 'Access-Control-Allow-Origin' "*" always;
                add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With' always;
                add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
                #Very Very Important! You SHOULD send no-store from server for Google Chrome.
                add_header Cache-Control 'no-store, no-cache, max-age=0, no-transform';
                add_header Last-Modified $date_gmt;
                    if_modified_since off;
                    expires off;
                    etag off;
                if ($request_method = OPTIONS ) {
                add_header Access-Control-Allow-Credentials "true";
                add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With' always;
                add_header 'Access-Control-Allow-Origin' "$http_origin" always;       
                add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
                return 204;
                    }
                }
           #HTTP2 & HTTP3 will not wait for the post body and return 200. We need to stop that behaviour.
           #Otherwise, you will see abnormal upload speed. To fix this issue, Enable the following lines. (Only Applicable If you Enabled HTTP2 or HTTP3 in This Server.)
            
           #HTTP2 & HTTP3 -> UPLOAD FIX -- START
           #location = /upload {
           #proxy_pass http://127.0.0.1:3000/dev-null;
           #}
           #location = /dev-null {
           #return 200;
           #}
           #HTTP2 & HTTP3 -> UPLOAD FIX -- END
              
        #Caching for Static Files,
        location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|woff2|svg)$ {
            access_log off;
            expires 365d;
            add_header Cache-Control public;
            add_header Vary Accept-Encoding;
            tcp_nodelay off;
            open_file_cache max=3000 inactive=120s;
            open_file_cache_valid 45s;
            open_file_cache_min_uses 2;
            open_file_cache_errors off;
            gzip on;
            gzip_disable "msie6";
            gzip_vary on;
            gzip_proxied any;
            gzip_comp_level 6;
            gzip_buffers 16 8k;
            gzip_http_version 1.1;
            gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
        }
      
    }
}
 
Note that both above posted AX routers have an SSD attached.

And now, for comparison, the ancient RT-AC66U, running Johns 374.43_52D8j9527 firmware with a 4GB thumb drive.
sshot-98.png
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top