Solved system gets slow overnight

Hello,

Looking for helps.
My laptop Thinkpad T430 has 13.0 release. Somehow I feel the system gets slow after some time. For example, I close all applications and leave the system running overnight, the next morning when I try to access some web pages using firefox or chromium, they are loaded quite slow. If I reboot the system and open the same web pages, clearly things go fast, or normal, so to speak. The system was installed about a year ago. It was a fresh installation, not an upgraded one, and it has had this behaviour since beginning.
What could be the problem? Are there fundamentals related to this matter that were not configure properly? Or is it the wireless NIC driver?
I understand the quesion may be too "general", but I don't know where to start to look for specifics.

Thanks you.
 
Maybe overnight the machine goes into suspend mode and the wifi module has sleep state.
When you wake it maybe wifi not in correct power mode.
Check the output of ifconfig wlan0 before and after.

Can't you use a wired connection overnight to isolate the problem?
 
Leave top running overnight - then when things are slow in the morning see if your system is swapping or low on RAM or if any processes have kicked off and are still running (perhaps for some reason they have failed to finish).

If you see any issues with swap/memory or CPU-hogging processes you can take it from there with other tools.
 
I also suspect that over night processes that are needed for your web browsing get swapped out. Perhaps as other maintenance processes run. If that's true, they should get swapped back in relatively quickly (seconds, dozens of seconds), and from then on it should be fast again. Do you see that? How long does it take to recover to normal?

Obviously, as others said above: also check for hardware shutting down.

Here's what I would do: Leave a text window (console or xterm) open. When you first get to the machine, before doing something complex like a web browser, do some probing with the CLI. Can you do ls on the local directory fast? Ping your local network? Ping remote networks (like 8.8.8.8)? Fetch a super-simple web page using wget or curl?

And one warning: If you start running tools to monitor the situation (like running top all night long), it might change the behavior.
 
Are you just running Freebsd overnight, or do you have a DE with browser open all night?

Even if you close firefox and chrome, they may be running in the background (so they start quicker), and eating memory and slowing the system.

Try killing all instances of firefox and chrome and leaving it all night. Try closing the DE too.

You may find it is not a FreeBSD problem, but what you have running on top of it.
 
I understand the quesion may be too "general", but I don't know where to start to look for specifics.

You are trying to get ideas. That's OK.
Trying to solve a problem at first means there is a problem.
And this means you are p!553d and worried, in any case emotionally affected, so not 100% cool :cool:
I solved so many problems just by asking other people such as starting a thread in a forum, just to have my thoughts sorted, get a starting point, because as I put it: Don't see the forest because of the trees.

There are not many reasons why a system may slow down. But there are many sources for the possible reasons.

To solve a prob systematically you need to work your way top-down.
Think of it as a tree turned upside down.
Define its root/trunk..topic generally ("system slows down overnight"). Then subdivide it (branches) into smaller pieces (twigs) you can do actual work on.
Sort them by plausability and amount of work to do, then process them - first the less work and most plausible ones.

First - that's all totally clear to everybody here, of course. But the very basics are often overseen by advanced people, because they are so obvious - a system gets slow, when its resources are used up: CPU time, memory (2 main branches to follow)

Pick one branch. Start with checking out memory.
Which memory there is (branching)?
RAM and disk space.
RAM was already handled here, so I offer to check on disk space.

When it slows down overnight and as I understood it gets better again after a while when using it in the morning to me it seems it could be a possibility the system starts doing maintenance on the filesystem, but run into a heavy load job cannot be finished in time.
How much space is left on your disk(s)?
Full disks lose perfomance. How much depends on the filesystem. Disk's usage above 60% can already be a problem for many fs.

Additionally a non overprovisioned SSD that's used for a while and not be trimmed may get permormance losses already at 50%.

Tip: Write it down.
Do take an actual sheet of paper and a real pen and write down the solution you've found.
You may not need the piece of paper ever again, but it gives you confidence to solve the problem easily when it ever occurs. But even more helps you to remember, what you've done.
 
Somehow I feel the system gets slow after some time.

Think 'out of the box' literal -- slowed internet connection might be caused by some neighbour or family member using bandwidth. It is not logical that a computer slows down because most humans go to bed.

Have the same noticed here. Started playing detective:

Internals: sysutils/htop, net/wireshark, maybe some file checking cron job is running;

Externals: who is running what networking services, maybe you can read the traffic on your router (how to's are on the internet). These days almost everything is online and streamed -- games, music, software telemetry, the fridge and toaster, etc.

When you have trouble with interaction with other humans, self reflection is the first thing to do. When a nice and well set up computer suddenly starts causing trouble, the cause might well be out of the box.
 
Can you post the output of top(1) when the system is slow?

If it was weekly, not daily, I would say that the locate cronjob paged things out.
 
… 13.0 release. …

Which version, exactly?

freebsd-version -kru ; uname -aKU

Hard disk drive, SSHD or solid state?

UFS or ZFS?

sysutils/zfs-stats zfs-mon displays efficiencies, for example:

1651634716977.png

– if you do not have an L2ARC device, then check the ARC measurementS.

sysutils/py-ioztat

Code:
% ioztat -z -i 10                                  
                                    operations    throughput 
dataset                             read  write   read  write
---------------------------------  -----  -----  -----  -----
Transcend/VirtualBox                   0      0  27.9K  25.0K
august/ROOT/n255078-e140d551b78-c     43     42   247K  35.1K
august/VirtualBox                      0      0    730      0
august/poudriere/data/cache            0      0      3      0
august/poudriere/data/logs             8      0  2.53K  2.55K
august/poudriere/data/packages         1      0  21.8K  7.46K
august/poudriere/jails/main            0      0  8.80K      0
august/poudriere/ports/default         0      0  5.00K    721
august/usr/home                      134     26  2.70M   323K
august/usr/ports                       0      0  1.21K    892
august/var/log                         0      0      8      7
august/var/mail                        0      0      0      2
---------------------------------  -----  -----  -----  -----
Transcend/VirtualBox                   2     15   329K   673K
august/ROOT/n255078-e140d551b78-c      6      0  7.28K      0
august/usr/home                        4      6  82.0K  34.2K
---------------------------------  -----  -----  -----  -----
Transcend/VirtualBox                   0     15   111K   252K
august/ROOT/n255078-e140d551b78-c      6      0  4.14K      0
august/usr/home                        4      4  39.2K  36.4K
^C
%

Check if there is not a periodic running.

Smart – not just during the run. There can be reduced efficiency (of things unrelated to the cron jobs) for some time after the run.
 
Thanks to all for the valuable inputs.
I wanted to repeat the behavior of system becoming slow overnight during the past week, but strangely I don't see it.
I'll post here when I have something.
 
Looks it always happens in the morning, around 0820 AM. This time it took about 5 minutes to load forums.freebsd.org in chromium. In firefox it was even worse. I kinda leaning towards the network morning traffic causes this.
I'll keep tracking.
 

Attachments

  • Screenshot_2022-05-19_08-23-55.png
    Screenshot_2022-05-19_08-23-55.png
    306.4 KB · Views: 57
Maybe overnight the machine goes into suspend mode and the wifi module has sleep state.
When you wake it maybe wifi not in correct power mode.
Check the output of ifconfig wlan0 before and after.

Can't you use a wired connection overnight to isolate the problem?

A while back I try to make the laptop go to sleep or suspend but failed. So now the system has no state change.
 
If I reboot the system and open the same web pages, clearly things go fast, or normal, so to speak.

I kinda leaning towards the network morning traffic causes this.

Do those two marry up? Are you saying you think your local network/provider is congested at that time in the morning? So if you reboot, the problem would still be there if that was the case?

If you rebooted at 8.18 a.m. and then try the same networking load that you use, are you saying the issue is still there around 8.20 a.m.?
 
Do those two marry up? Are you saying you think your local network/provider is congested at that time in the morning? So if you reboot, the problem would still be there if that was the case?

If you rebooted at 8.18 a.m. and then try the same networking load that you use, are you saying the issue is still there around 8.20 a.m.?

You got me. If I reboot, my experience is the problem goes away, even the time is around 820am. Blaming the network traffic was just a wild guess. This thing is so strange. This morning I couldn't repeat the problem.
 
Externals: who is running what networking services, maybe you can read the traffic on your router (how to's are on the internet). These days almost everything is online and streamed -- games, music, software telemetry, the fridge and toaster, etc.

As demonstrated here last week:

Although I pulled ethernet cables to my box, the internet connection was terribly slow. Cause: one of the kids was downloading some 'music plugin' of 78 bloody GigaBytes, hijacking bandwidth.

Closing the lid of his laptop did the trick.

Computer failure is mostly caused by bad human behaviour (including stupids who make such plugins).
 
Did a very simple test this morning after the internet connection on my FBSD box collapsed while starting up the boss box to get to remote work.

From my FreeBSD box, X with just a terminal:

ping <some site>
avg 1027.337 ms

After shutting down W10 boss box, no other changes
avg 16.758 ms

Both boxes are on one switch to the router

Rebooted the W10 box

A constantly running ping on my FBSD box revealed that when the Citrix Gateway [no freshports entry known] starts, speed drops from 16ms to 1000ms and more on my FBSD box.

1) this was rather conclusive on malware hijacking the connection
2) proved to be a very simple 'Deduction of Cause'

Good Luck on deducting causes of collapsing internet connections! (to do a 'DCoCIC')
I'll register the DoC® acronym ;-)

Cheers,
 
Citrix Gateway sounds like a VPN PoP (Point of Presence). If so, there are no surprises here; some VPN tunnels are configured so that all traffic goes through the tunnel; no traffic goes directly to the Internet. All your traffic going through a VPN PoP before it reaches the internet could very well explain the high latency.
 
Citrix Gateway sounds like a VPN PoP (Point of Presence). If so, there are no surprises here; some VPN tunnels are configured so that all traffic goes through the tunnel; no traffic goes directly to the Internet. All your traffic going through a VPN PoP before it reaches the internet could very well explain the high latency.
TNX.

The W10 boss box indeed has a VPN, the FBSD box not. Both are on the same switch with one cable to the router and the internet.

My question is if the VPN is taking all bandwidth on the switch, and why? Is there some 'priority rule' in the switch?
 
Back
Top