Years have passed since I installed the Ubuntu Operating System. After installing some applications (such as MATLAB, MySQL, Blender, GIMP) that require high performance on the system, I noticed that the system performance deteriorated over time.
I've been focusing on data science, artificial intelligence, and machine learning lately, and I've been using toolsets like Kubeflow. While testing the software I developed, I realized that the system performance deteriorated and that I could not create the necessary isolated environment to correctly evaluate the results of the parallel running AI application.
Is there a way to improve system performance in Ubuntu OS? What solution do I need to develop?
CodePudding user response:
The reason for this situation is that the services associated with the applications that you have installed but not uninstalled on the system before are started automatically at boot time.
For example, when you install MySQL Server, services related to MySQL server will be started automatically at system startup. If you are using the system you are using as a laboratory, I think there is no need for MySQL Server related services to be run automatically at every system startup. When you want to use MySQL server, you can start MySQL server related services manually.
To manage the services, follow the procedure below.
1. Listing Services
# Finding services started at boot
service --status-all
# Listing services started at boot
initctl list
# Listing services (systemd is available in Ubuntu, `systemctl` command active)
sudo systemctl list-unit-files --state=enabled
2. Reducing CPU Load
You can use preload
to install commonly used applications. preload
is a daemon that runs in the background and analyzes frequently-run applications.
# Installing `Preload`
sudo apt-get install -y preload
3. Managing Service
systemd starts, stops, enables and disables “unitsâ€. We will use the Hddtemp program to test managing services.
# Installing The Hddtemp
sudo apt-get install hddtemp
# Starting The Hddtemp
sudo systemctl start hddtemp.service
# Restarting The Hddtemp
sudo systemctl restart hddtemp
# Stop The Hddtemp
sudo systemctl stop hddtemp
# Get More Information About A Service
sudo systemctl status hddtemp
4. Managing Applications (Reboot)
# Initialize at boot of the volume
sudo systemctl enable hddtemp
# Both activating and initializing a volume
sudo systemctl enable --now unit
# Disabling a volume
sudo systemctl disable hddtemp
# Find out if a volume is active
sudo systemctl is-enabled unit
5. Suggestions
If too many applications are running in the system, close the applications (services, units) you do not use. Also, disable apps you don't use and running in the background.