Operations 14 min read

20 Essential Linux Server Performance Tweaks Every Sysadmin Should Know

This guide outlines practical Linux server optimization techniques—from disabling unnecessary daemons and GUI to tuning kernel parameters, file systems, TCP settings, and monitoring tools—helping administrators boost stability, reduce resource usage, and improve overall system performance.

Liangxu Linux
Liangxu Linux
Liangxu Linux
20 Essential Linux Server Performance Tweaks Every Sysadmin Should Know

Background

Linux is an open‑source OS widely used for servers. Server installations typically run without a graphical user interface, focusing on efficient handling of non‑interactive processes and sustained high‑load performance.

High‑Availability Use Cases

Linux high‑availability clusters allow multiple machines to provide continuous service during hardware or software failures. Typical roles include web, CMS, file, VoIP, mail, DNS, database, and cloud‑infrastructure nodes.

Performance‑Improving Tips

1. Adjust I/O scheduler (elevator)

Select an appropriate I/O scheduler (e.g., deadline, cfq, noop) to balance latency and throughput for the workload.

2. Disable unnecessary daemons

Stop services that are not required to free memory, CPU and reduce attack surface. Common candidates:

apmd – Advanced Power Management daemon

nfslock – NFS file locking

isdn – ISDN modem support

autofs – Automatic filesystem mounting

sendmail – Mail transfer agent

xfs – X Window font server

3. Turn off the GUI

Set the default runlevel to 3 (multi‑user, no GUI) instead of 5. The graphical environment can be started later with startx if needed.

4. Remove unneeded modules or features

Disable unused Apache modules or other server components to reduce memory consumption.

5. Remove control‑panel packages

Uninstall cPanel, Plesk, Webmin, phpMyAdmin, etc., to save roughly 120 MB RAM and lower overall memory usage by 30‑40%.

6. Improve Exim performance

Install a DNS caching daemon (e.g., djbdns) so Exim can resolve hostnames without repeated external lookups.

7. Strengthen GPG encryption

Specify the AES‑256 cipher when encrypting files:

gpg --cipher-algo AES256 -c file

8. Secure remote backup transfers

Use scp or rsync over SSH to ensure backups cannot be accessed or altered by unauthorized parties.

9. Tune kernel parameters for databases

Adjust shared memory and semaphore settings, for example:

kernel.shmmax=268435456 # 32‑bit kernel.shmmax=1073741824 # 64‑bit kernel.msgmni=1024 fs.file-max=8192 kernel.sem="250 32000 32 1024"

10. Optimize TCP settings

Increase the TCP window size (e.g., net.core.rmem_max, net.core.wmem_max) to improve throughput on high‑latency links.

11. Choose the right filesystem

Prefer ext4 over ext3 for larger storage limits, journaling, faster writes and reduced fsck time.

12. Use noatime mount option

Add noatime to /etc/fstab to suppress updating file access timestamps, reducing disk writes.

13. Raise file‑descriptor limits

Increase the per‑process limit (default 1024) with ulimit -n 4096 or by editing /etc/security/limits.conf for high‑concurrency servers.

14. Tune MySQL configuration

Adjust cache sizes (e.g., innodb_buffer_pool_size, key_buffer_size) to match available RAM; increase them if the server stalls under load.

15. Tune Apache configuration

Review StartServers, MinSpareServers and MaxRequestWorkers to reduce memory usage by 30‑40%.

16. Analyze server performance

Use monitoring tools (top, vmstat, iostat, sar, free) to identify bottlenecks and address them systematically.

17. Essential Linux performance commands

top

– real‑time process and load view vmstat 10 – CPU, memory, I/O snapshot every 10 seconds iostat – device utilization statistics free -s 5 – memory usage updated every 5 seconds sar – collect and report historical performance data

18. Move log files to RAM

Configure a ramlog (tmpfs) for system logs and flush them to disk only on shutdown to extend SSD lifespan.

19. Buffer log writes

Allocate a fixed‑size RAM area for log buffering; write to disk only when the buffer fills, reducing write cycles.

20. General optimization tips

Prefer static content over dynamic generation; use FastCGI or mod_perl instead of CGI for faster request handling.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

performance tuningOperating SystemSysadminserver optimization
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.