For the majority of us who have grown accustomed to a Windows environment over the years, Linux can seem like another world. In essence, Linux is a free open-source operating system that has gained increasing popularity since its release in 1991. Linux is based on the whole Unix ecosystem of operating systems that grew out of Bell Laboratories in the early 1970s. Linux has been around for almost 25 years and grew immensely in the late 1990s and early 2000s when it became associated with the LAMP web development stack; Linux stands for the ‘L’ in the acronym of popular tools, along with Apache, MySQL, and PHP/Perl/Python.
The main difference that any user will readily notice between Linux and Window is that the Linux server tends not to install the Graphical User Interface by default but instead leaves you with a command line interface. The command line environment is very different than just clicking on icons in Windows. Consider something like this:
# My first script echo “Hello World!”
Or consider commands like “mkdir” for creating a directory, or “ls” for listing out the contents of one. Again, for traditional Windows-users, Linux will seem like a foreign language at first.
Despite an initial learning curve, the payoff is worthwhile as Linux is an extremely versatile and powerful platform. In fact, one of the reasons for its global popularity is that it can be used for many other purposes than merely an OS. Linux’s range of usages encompass web server or office intranet server, a CMS or CRS server, a file server serving files to windows and/or Linux users, a voice-over IP telephony server, mail or domain name server, data base server, as an infrastructure node in a Cloud computing configuration and much more.
As with any technology infrastructure, your Linux installation will require close attention to ensure you’re getting the best deal on performance. You’ll want to keep your environment running as smoothly and effectively as possible, and avoid any challenges to your business critical applications. In the following we’ve accumulated 9 easy performance tips that will help keep your Linux environment in tip-top shape. Read on!
1. Disable unnecessary components
Linux comes bundled with a number of components and background services which run on every server but that are not required. The problem is that these “extras” take away valuable RAM and CPU. The best place to disable them is the startup scripts that start these services at boot time. Disabling these services will free up memory and decrease startup time. Examples of features to review are some of the popular control panels, such as Cpanel, Plesk, Webmin, and phpMyAdmin. Disabling these software packages can free up as much as 120 MB of RAM on your system.
2. Keep up with system updates
Linux is an open source platform that offers a large number of distributions, such as Ubuntu, Fedora, CentOS, and Mint and more; the most popular version is Ubuntu. Whatever version of Linux you happen to be using, it’s important that you commit to keeping the software current and robust. New fixes and security patches are added in every release. So one best practice is to always upgrade to the latest stable version of whatever platform of Linux you prefer. This will ensure that you keep all your clients, services, and applications running as securely as possible. It’s also recommended that you always have a sandbox in place, where you can test updates and detect any potential issues prior to running in production mode.
3. Get rid of the GUI
The distinct feature of Linux is that it doesn’t require a GUI; rather, everything can be run from the command-line. For some folks this is intuitive whereas for others (such as Windows users) it’s a foreign concept. In any case, when you’re in Linux territory having no GUI can save CPU cycles and memory, not to mention circumvent possible security issues. In order to disable GUI, “init level” should be set to 3 (command line login), rather than 5 (graphical login). If a GUI is needed, it can always be started manually with startx.
4. Tune up your TCP
Keeping your TCP protocol optimized helps improve network throughput for applications that require frequent connectivity. It’s especially recommended that you use larger TCP Linux sizes for communications across wide-area networks with large bandwidth and long delay characteristics; this tweak helps to improve data transfer rates.
5. Optimize your virtualbox
A popular way of running Linux is within a virtual environment, using a VM like VirtualBox or VMware Player so that Linux/Ubuntu can run in a window on your existing Windows or Mac desktop. The advantages here are that VMs can be used to test guest OSs in a sandbox-like environment, but which don’t have to be compliant or come in contact with the host machine or hardware. Since using a “virtualbox” is just like running another host, there are a number of optimizations you’ll want to make to your preferred VM tool such as disabling unnecessary services, optimizing performance, lightening the load, and blocking advertising. For a more detailed review of VM optimizations and fixes for Linux, see this helpful article.
6. Check for proper configurations of MySQL and Apache
Your Linux environment does not run in isolation; other important integrated services such as MySQL and Apache should also be optimized in order to get more out of your Linux stack. For example, to increase accessible RAM (or allot more RAM to MySQL), it’s a good idea to adjust the MySQL cache sizes (depending on your needs and the size of the MySQL requests). The same holds for Apache. Checking the ‘StartServers’ and ‘MinSpareServers’ directives will tell you how much memory Apache utilizes. Adjusting these settings will help you save RAM by as much as 30-40%.
7. Learn the 5 basic Linux performance commands
There are 5 basic Linux commands that every user should know; they are: top, vmstat, iostat, free & sar. These offer various optics on everything from current uptime and system load to CPU usage to main memory stats. For a comprehensive overview of these commands, see this article here.
8. Review and clean up additional modules or features
Similar to the disabling of extra services mentioned above, you’ll want to review any other modules or features that may be taking resources away from your system memory. For example, review the configuration files for Apache and decide if FrontPage support or some of the other extra modules are required. Adjusting or even turning these modules off will help to save memory and improve overall speed within your Linux environment.
9. Leverage Monitis Linux Monitoring
If you’re looking for best-in-class web monitoring and performance tracking then you need to head over to Monitis. With its industry-leading global service, Monitis lets businesses monitor their network anytime and from anywhere, including website uptime monitoring, full page load and transaction monitoring, and web load testing. The benefits and takeaways here are peace of mind and less stress. When it comes to monitoring you Linux environment, Monitis has you covered. Monitis Smart Agent for Linux allows monitoring of processes, CPU, memory, and hard drive utilization on a Linux server. And while you’re at it, why not add to this service Monitis Load Monitoring? This feature allows you to set load average thresholds so you get alerted if your Linux machine reaches some critical load levels already preset by you.
When it comes to monitoring your business-critical applications, especially those reliant on Linux, you don’t want to shortchange yourself. Get the peace of mind you deserve by entrusting your business to a proven industry leader. Go to Monitis and sign up for a free trial today and let them help boost your bottom-line. You’ll be glad you did!