Closed ChrisWNY closed 1 year ago
@ChrisWNY I think it might be due to fewer resources allocated when running in systemd service mode.
Can you try running this directly
sudo /var/www/html/admin/scripts/pi-hole/speedtest/speedtest.sh
@ChrisWNY also try switching to cron
sudo crontab -e -u root
then add
0 */12 * * * sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest.sh""
I did include CPUQuota=20% in the systemd unit, could that be the cause?
CPUQuota
Might have, @ipitio can you give instructions to remove those and test .
To remove that and test, run sudo systemctl edit --full pihole-speedtest.service
. This will open the unit file; remove the line with the quota, save and exit, and run sudo systemctl daemon-reload
.
Thanks guys - I am in the process of making the edits. The scheduled script will kick off in 20 mins...so I'll post another update shortly.
Btw, running sudo /var/www/html/admin/scripts/pi-hole/speedtest/speedtest.sh gave me full down/up, 930Mbps on both.
I've also completed the edits, removed the CPUQuota=20% statement. I suppose upstream uses a lot less CPU than downstream?
Well that solved the problem. Scheduled script kicked off, 930Mbps downstream/upstream. Thanks for the prompt responses!
Awesome, I'll remove the quota. I thought 20% would be enough for a speedtest haha.
Apparently 1Gbps NIC transfer pushes that Pi 4b CPU to the edge lol...I wouldn't worry too much about quotas on the CPU since the speedtests are short-lived, but understand it's probably best practice to set quotas.
The change to the CPU quota fixed this issue. Closing.
This is an odd issue but is definitely reproduceable and consistent in the latest pihole-speedtest release...
Whenever the scheduled speedtest script kicks off (I have it set to use a specific speedtest server ID) , which I have set to run every 12 hours, I get HALF the download speed I would expect, but full upstream speed. This is consistent. My WAN is 1Gb symmetrical, so normally my tests are 900-950Mbps up and down, with some variation based on circumstances between my WAN and the speedtest server. This problem is consistent with DOWNLOAD speed halved on every scheduled speedtest run.
When I go into the pihole-speedtest settings and check off the RUN TEST NOW checkbox, then submit, I get full download/upload speedtest results, as expected. This is reproduceable every time. Note that RUN TEST NOW and the scheduled speedtest script use the exact same speedtest server, same ID.
Has anyone else encountered this behavior? I've never observed anything like this up until the latest release. Not sure what's going on with the scheduled script, it was very reliable up until this most recent update.