This blog is NOFOLLOW Free!

Tag: services

Linux – Getting the Correct Time
By Richard N Williams

Ensuring a computer is not only displaying the correct time but that it is being maintained accurately is not as straight-forward as it first sounds.

Most Linux systems have two clocks. The hardware clock, also known as the CMOS of Bios clock, is usually a simple crystal oscillator with battery back-up that maintains time when your system is off or boots up. This clock is usually located on the motherboard and will run all the time, however these clock chips tend to lose time as the computer ages and the battery weakens.9

The other clock, the system clock, is a software clock and it starts when you boot up your system often getting an initial time from the hardware clock. System clocks keep time by adding seconds on to a prime epoch, a base time that for Linux and Unix, began at midnight on January 1, 1970.

However, the hardware clock is a cheap electronic oscillator and cannot maintain time to any useful degree of accuracy. They often drift several seconds a day which for day-to-day process is probably adequate but with time sensitive applications it can cause serious problems.

A better way is to set the system clock using the time from a NTP (Network Time Protocol) time server. These dedicated time servers get a UTC (Coordinated Universal Time) time from an atomic clock which are the most accurate time keepers in the world, not losing a second in time in several millions of years.

Dedicated NTP servers use either a radio receiver to pick-up a radio time and frequency broadcast which are transmitted by several national laboratories or by using the timing signal broadcast from the GPS network.

Linux uses a NTP service called NTP Daemon (ntpd). This uses NTP to adjust the system clock for any drift in time as it frequently check the UTC time source.

To configure the NTP daemon the ntp.conf file in the /etc directory can be used. From here more than one time server can be used as a reference and also the frequency it is checked can also be altered.

Richard N Williams is a technical author and specialist in atomic clocks, telecommunications, NTP and network time synchronisation helping to develop dedicated NTP clocks. Please visit us for more information about a network time server or other ntp server solutions.

Tags: , , , ,

5 Linux VPS Performance Tips
By Christopher Pace

As a freelance Linux consultant, many of my clients are often interested in making their VPS (Virtual Private Server) as responsive as possible. Since VPS servers by nature have somewhat limited system resources (often less than 1 GB of RAM), getting the best VPS performance can be a crucial part of running a successful server. To make matters worse, most clients assume that the VPS host has already optimized their server- which simply isn’t true (even Rackspace, a wonderful VPS host, doesn’t do this). Therefore, I’ve written this article as a brief introduction to some of the more common ways to get the best performance from a VPS.

Tip #1: Disable system services
The top way to increase your VPS performance is to disable any system services that are not necessary. Services that are never used will still use up valuable RAM and CPU time, and also possibly allow your server to be attacked remotely. If you don’t need these services, why have them? Manage the startup scripts that start these services at boot time, and disable them.

Tip #2: Configure MySQL properly.
not-butter-210x130One of the more common ways to increase the available RAM (or to allocate more RAM to MySQL) is to configure the MySQL cache sizes. If your MySQL server instance is using too much memory, decrease the cache sizes. Likewise, if MySQL gets bogged down with large requests, increase the MySQL cache.

Tip #3: Configure Apache properly.
With Apache 2.0, many system administrators and clients alike have become confused as to the proper configuration of the Apache worker threads. Check how much memory Apache is using, and adjust the StartServers and MinSpareServers directives as needed to free up more memory.

Tip #4: Clean up your modules!
Without exception, there will always be modules or features that are enabled in memory hungry server software packages (such as Apache) that simply are not needed. Take a look at the configuration files for Apache, and decide if you need FrontPage support, or some of the other extra modules that ship with the VPS software packages. Disabling unnecessary modules or plugins will decrease the system memory that server software such as Apache requires, which will give you more resources for the software that needs it!

Tip #5: Disable control panels.
Let’s face it, everyone loves the more popular control panels, such as Cpanel, Plesk, Webmin, and phpMyAdmin. Heck, I’ve even written tutorials on how to use some of these control panel software packages. However, disabling these software packages frees up quite a bit of resources- sometimes as much as 120 MB of RAM! Sometimes the best solution is to disable these control panels until you actually need them- then they can be turned on via a PHP script (albeit somewhat insecure), or via a command entered at a shell prompt.

These 5 tips should decease the amount of RAM that your VPS uses by as much as 30-40%, which might save you quite a bit of money per month. Since most providers start out their VPS plans at systems with 256MB of RAM (and upgrades from there are expensive, often costing $40/month for an additional 256 MB), optimization of a VPS server is a crucial step. In addition, these 5 tips can be performed by a talented system administrator or consultant in typically less than two hours, which can mean a return on investment after only two or three billing cycles. What you do with the extra money saved is your business- you’ve earned it!

Christopher J. Pace is a freelance Linux consultant who has worked with Linux since 2001. Currently, he provides remote Linux consulting services for sick servers.

Tags: , , , , , , ,
Back to top