Speedtest CLI. Run speedtest on pfSense box
-
@aln said in Speedtest CLI. Run speedtest on pfSense box:
still say the the most accurate ISP speedtest is on the router itself, eliminating the rest of the network hops.
Logic is flawed... I just showed where the router is not showing the full speed of the connection, yet a client routing through said firewall router is..
The problem with doing such tests on a "router" is the router normally is not designed to do such testing - its a router.. not a client... It routes packets, it firewalls traffic. It not meant to be a client doing speed test. Now if you have some low speed connection or a BEAST of router then sure you might not have a problem.. As per the example in this thread.. JFC I5-7600 cpu for a "router" That is nuts for any sort of soho network... That cpu has a tdp of 65W.. Why would anyone want such beast to firewall/route.. Just sucking juice!
If your switches are hindering your speed, you got ISSUES! If your wifi is reaching your max isp speed... That is normal for any decent speed connection.. Since wireless is just not really capable of full gig speeds - be it the AP capabilities, or quite often just the client not able to do it..
Testing isp speed via a wifi client is normally never a "good" test.. What you should be testing is if your wifi client can do what your wifi network should be able to do.. Normally something lower than your isp speed.. Unless you got some low speed connection.
-
@johnpoz I don't know how your logic works, but if I want to test my ISP then I want to exclude switches and wifi APs from the test.
Your explanation on how a router (yes, pfSense is basically a router, no need to use parentheses) is not a client is completely wrong. A router is first of all a client, it connects to a network and being served an IP address. Therefor it's a client!
Your test on the router shows slower results because your CPU doesn't have the juice to run the test, that's all. For many others it works perfectly. And why do we use those over sized hardware? Because we can afford it, we don't care about the electricity bill, we like playing with it and ... we can run speedtest on it :) -
Also, in some cases, especially in remote support, it is not practical to have access to internal resources to run browser based speed test or cli over unix terminals.
So, yes, if we are optimizing things, probably it won't cut it.
But if we need a broad estimate if things are more or less within expected performance, this comes handy.
A problematic wan connection will be revealed immediately if there is packet loss, errors etc., before even touching any access cpe.Certainly, there is no one size fits all answer to this :)
-
@aln please start a new thread. This needs a new thread.
-
I guess I have some apologies to make,
first, sorry for providing the original instructions for the how to make the gui to show the speedtest, I feel it may have divided the community over whether it should exist, allowing for the user to test speed from the router itself or a device behind it. my need came about because every time I had an issue with my ISP I was forced to unplug everything from their device and plug in a single laptop/desktop which after a period of time became a pain point.
secondly my website is back online at a new address www.some-useful.info, sorry it's took a while, but having seen the progress made by the likes of aln and his script, it's not really relevant anymore as we've moved on from the original I came up with.
As a request to aln can you look to include a check for updates button on your implementation or have the script check for updates periodically, save me looking for posts that say an update has been issued.
regards
Zak -
@adamoutler, sorry i've missed loads on this thread and the general bigger picture, but how does starting a new thread help?
-
Hi @RaidArray ,
To be honest about it I didn't even see your earlier post before jumping into this thread.
I did read it now. There is one problem with your approach, embedding a widget the way you did still doesn't perform the test from the router but rather from the client. All the test is done from the browser and by this you miss your original goal, that is to test your ISP.
If you have the traffic graphs widget on the dashboard and you monitor WAN and LAN networks you can see that running my widget will show traffic only on the WAN interface. With your approach you will see the traffic on the LAN as well.
My reason for creating a widget is exactly as you describe it, testing my connection directly on the line so my ISP cant BS me and ask me do disconnect half of my equipment.
This is really quick and dirty work, but your idea of including update (or even autoupdate) is great! TY. -
This post is deleted! -
@johnpoz said in Speedtest CLI. Run speedtest on pfSense box:
JFC I5-7600 cpu for a "router" That is nuts for any sort of soho network... That cpu has a tdp of 65W.. Why would anyone want such beast to firewall/route.. Just sucking juice!
I have no idea who you're talking about
-
@RaidArray because this is for CLI. @aln is a GUI. It needs its own thread for updates, support, contribution, and feature requests. Each separate item should have its own thread. Also, it helps with advertising.
-
@jimp said in Speedtest CLI. Run speedtest on pfSense box:
That looks nice, though it's usually better to test bandwidth through the firewall and not from the firewall itself. pfSense has been optimized to work in a routing role, so sometimes you might see reduced numbers when pfSense itself is acting like the client.
Point-
On my "made to be a router" Watchguard XTM5 box with a 4 core 3ghz proc running pfsense I only see about 50% of my speed on the router itself. But full speed + on the LAN.I still like this idea and plan on using it on some remote sites where I have no computer on site to access and test.
-
Hi All,
Hearing the comments here I did a complete rebuild.
The new version on github is using Netflix'es fast.com and not Ookla's speedtest.net, it is single threaded and should be easier on lesser cpus.
It also does not depend on the speedtest-cli package.
Feedbacks are welcomed. -
Yeah that is even more of difference..
Let me say this once again!!! Speed test on "routers" is not valid... You with your I5 freaking ROCKETship desktop/server box is not a "router".. Even if your using it as one ;)
So while such test have use, its going to cause users to question.. Why is pfsense slow... Has been doing so for years.. Ever since the first time the php client was shown that it would run on pfsense.
-
@aln and everyone -
Has anybody tried using the official Ookla Speedtest.net FreeBSD CLI package on pfSense instead of the third party speedtest-cli package?
https://www.speedtest.net/apps/cli
I'm curious if this could just be a drop in replacement or has the potential to cause issues. Thanks in advance!
-
@aln you really need to start a new thread
-
@aln After a few runs, new speedtest seems not to report new values. I see it generates traffic, seems to complete but no new output is reported. Tried removing it and re adding and it comes with same results, even without running.. Any ideas?
-
@tman222 i tried it on osx, seems to lock my computer. also if you are on freebsd on non x86 architecture then you're out of luck.
-
@netblues difficult to say. Do you get any errors on your browser's dev tools? can you maybe paste the request and response that the widget generates?
-
@johnpoz got it, it doesn't work for you. Did you notice that a widget has an uninstall (-) button?
-
@aln After some fiddling, I thing the problem is on how you interpret upload speed
It is completely wrong. It reports 26.6 when both trafic graphs AND running fast from browser reports upload around 4.
For test, I just inserted an$upload = number_format($info['upload_content_length'] * 8 / $info['total_time'] / 1024 / 1024, 2);
$upload = 5;effectively ovewriting the result, and got it reported after a speed test
Download speed and everything else seems to work(and the time is completely wrong too, but thats minor)
-
@netblues thanks for the feedback!
I don't think that the calculation is wrong cause thats also how download is being calculated. I suspect that I push a too large upload that might be rejected by the server.
Can you check if the latest version works for you? -
@aln Well, its closer, at 6.6 but still not the real one.
Also it took ages to complete, and fails to keep the download steady too.
The cli version produced far more better results on the same network/hardware..
-
@netblues I think you are right, I'll scrap this version.
-
This is a dual core, Intel(R) Celeron(R) CPU N3050 @ 1.60GHz
Current: 1600 MHz, Max: 1601 MHz
2 CPUs: 1 package(s) x 2 core(s)
AES-NI CPU Crypto: Yes (active)speedtest-cli on pfsense and via browser is close too
1st peak is with cli, 2nd via browser
Hosted by Vodafone - Panafon S.A. (Athens) [0.97 km]: 36.415 ms
Testing download speed................................................................................
Download: 41.65 Mbit/s
Testing upload speed......................................................................................................
Upload: 4.08 Mbit/sand web based below
-
@aln said in Speedtest CLI. Run speedtest on pfSense box:
it doesn't work for you. Did you notice that a widget has an uninstall (-) button?
It works for me.. Your code is fine, an its great work.. My point is this not something that is needed or even wanted by anyone that actually runs a router.. And doesn't run a desktop sucking 95 watts sitting there idle as their "router"
Your point of testing it at the router makes more sense because it removes stuff that could slow down in your network is not a valid logic..
When you do a speed test, you should testing from your client to test your "network" not just pfsense.. Pfsense is meant to route/firewall traffic - not be a client..
I have made my point clear.. And here is what I am going to do.. Every single post that comes up that I come across asking about why is pfsense slow I am going to forward to you to answer ;) hehehe
@netblues your on dialup.. So yeah its going to be fine.. 40mbps?? That is an internet connection? Or your hot spotted off you phone on 3g?
-
@johnpoz This is a home lab which I use for tests, and no, its not dialup :P
Obviously, a dual core n3050 can handle 50/5 speedtests at ease.Getting back to the original speedtest@pf debate, consider sitting at the porch, and then the youngsters complain about games lagging.
Wifi is at limits, so instead of getting up and head to the home data center management room, one logs in to pf from phone. And since speed test from mobile wifi won't cut it, speedtest widget will tell you if you really need to get up.
Now I could run ssh terminal on android and use a bluetooth foldable keyboard and......
No.ps If speedtest widget is not available on a default pf install, and one has to find and install it by reading the forum, then all is good. I doubt anyone will ever complain about speed. At least not from the widget. I even bet a few beers on that.
-
@johnpoz your point of view is very narrow. There are different users out there with different needs.
Also if they came that far to use pfSense then probably not all of them are "fools". -
@aln agree totally, but at the time it gave me what I needed so thought I'd share it with the community. didn't think it would divide the community in the way it did. bottom line in my book is that if you are intelligent enough to find the solution to a problem you have you should be intelligent enough to fault find it. I'm not impressed with the negativity coming through some of the posts on this thread.
-
@tman222 it won't work i looked at it, it's compiled for a newer version of freebsd than that which pfsense runs on, unless of course it's been updated over the past few months.
-
@johnpoz all of my Google WiFi access points run daily checks. They are intended to be routers. I can't understand why you would say a router is not intended to do such a thing.
Have you considered that the line you see and speeds from the speedtest.net are not actual, untampered results? I see some pretty serious QoS problems on my provider.
Also, if you run your own speedtest.net server (like ISPs) there are ways to fake the results, like increasing file sizes (more mb = assumed more MBps for some reason) and setting priorities to known servers.
-
@adamoutler said in Speedtest CLI. Run speedtest on pfSense box:
Google WiFi access points run daily checks. They are intended to be routers
No they are not.. Do you mean the router, the nodes are not routers...
They have their own built in speed test, and just had my son run it on his - guess what, it doesn't show his full speed 500Mbps he is suppose to get from his isp..
Is that isp, is that the google router test... Not sure - since he is just moving into the house.. And he has nothing that can actually test via wire gig.. So that will have to wait.
Those tests you posted or horrible!! 346 one day and then 3.5 the next? What speed do you actually pay for?
speeds from the speedtest.net are not actual
WTF does have to do if run from router or client behind router... Point has been made - you guys have fun... If you want to run speedtest from where ever... have at it... Point has been made.. I just tied of seeing why is pfsense speedtest not showing full speed... Which as been asked for YEARS... And this is only going to bring more of those..
You know how I know I am seeing full speed of what I pay for, I agree with you - speedtest nests can be misleading.. Is when I download files from my server in the NL.. .And see 60+ MBps which is my 500Mbps I pay for from isp..
-
@johnpoz point the finger where it belongs. Point it at the ISP. They aren't giving clients the actual results. They run their own servers and you should trust pFSense over an Speedtest.net which is paid for by ISPs.
-
Dude has Zero to do with the ISP... What do you not get that a router with X cpu designed to route packets might not be able to do 500/1000 as a client?
Have already show this multiiple times... Test to same freaking place ran on client shows full speed, test on pfsense does not will..
I'm done - have fun...
should trust pFSense over an Speedtest.net which is paid for by ISPs.
You clearly have no clue to what is even being discussed here to be honest..
-
@johnpoz if it can't do 500mbps as a client, then how can it possibly act as a client AND a server for packet filtering, suricata, or plain routing? This doesn't make sense unless something was seriously wrong with the libraries.
-
Hi know this topic is old but I did not see any other updates elsewhere.
@aln Thank you so much for the work that you have done with this! While there is allot of blustering from people on here with their personal options I think this is a handy tool.
pfsence has many more features then just "routing" and the more information you have about network speeds from different points can be useful.
Personally I like this tool because I have a pfsence box that can handle the workload without issue. It is useful to me to see what speed my edge device is getting to the outside world. (without the fuss of going though the other hops in my internal network) It also helps me keep track of my crappy ISP.
That being said If you ever wanted to make an update.. I would love to see something that gave a history of over period of time that would allow you to see to trends etc.
Just an idea, not sure if anyone else would like this etc. But once again thank you!
EDIT : kind of like what @provels has done but without using a 3rd party etc.
-
@Exilewolf
It was a fun exercise, but the results are so variable that I don't think the data is really worth the bits it's printed on. The big dip to the right was easily recognized without the data. It was a local outage. FWIW, this data was gathered from a server behind the FW and not just the FW. I have a 300/20 line.
-
This post is deleted! -
@aln thanks so much for this. can you please clarify how can i bind an specific interface when running a test from your widget?
-
Haha.. this is a hilariously classic pfsense forums discussion. I love the ones where the supposedly knowledgeable "mod" tells people that they are "holding it wrong" because they cant conceive of people actually using their product how they want.
I too want to do a speedtest from the router. And yes gasp, i use old desktops that get upgraded as routers. And i have ever since my first 486 firewall in 1996, with dubble /netbsd that came on two floppies. What the hell else are you going to do with old desktops? stick em in a 2U server case and rack em up.
The reason i personally want to speed test from the firewall is that the level 1 techs at the ISP always want you to connect your own computer directly to the modem. I dont want to rewire my network and do that, so the next best device to run this sort of test on is the firewall itself. And its a good test to see if the problem is on the lan or wan side too.
I took my sons old computer, a i5-2400 and slapped that in to replace my q6600 core2 quad. And pfsense took it no problem and booted right up after i remapped one interface whoes name changed.
If I wanted an appliance, i would have got a mikrotik. But i prefer running on consumer hardware at home so that if something breaks its easy enough to find some parts in the parts bin to fix it. The only reason i really upgraded was because the core 2 quad mobo only had a 100mb interface and now i have a gig. Which was necessary for this speed upgrade here. I am trying to get 700/20 up that i am paying for now.And i have used plenty of firewalls with large pricetags that pfsense runs circles around in terms of ease of use and setup. Running on consumer hardware isn't a flaw in the product, its one of its main strengths.
I installed the widget with the oneline command (thank you muchly), and find it about the same as speedtest/fast.com. I always prefer speedof.me as that cannot be faked. But it almost always skews quite a bit lower on most connections for some reason. On really nice connections i get what is advertised with the speedof.me test but rarely on home or small biz connections. Maybe last mile lag affects that test more.
Anyways got what i needed and it was a fun ride. The widget works and i am grateful for that. The pfsense community delivers once again!
`
-
@andresmorago you will need to modify the widget and add the --source parameter to the cli command. Look it up in the speedtest-cli docs.