Deploying a Low Latency Kernel with Ubuntu Server 16.04 LTS

Overview

In this brief article I will discuss deploying a low latency kernel for Ubuntu Server 16.04 LTS. This kernel changes the timer frequency from the default 250Hz to 1000Hz. This kernel is also called the “soft real-time kernel” and is forked (and regularly updated) from the generic kernel source tree. This kernel can be useful for all applications that require very low latency response like Asterisk. In this document, I will also describe how to set the lowlatency kernel as the primary kernel, and make sure its update and reboot “proof”. It’s also important to note that this kernel is generally updated days after the generic stock kernel. There’s no need to custom-compile a kernel to achieve higher timer frequency. This approach also assures future kernel updates are quick and painless.

Update the APT Cache

We’re starting with a fresh system, so we should first update the APT cache for good measure.

# sudo apt-get update

 

Install the “linux-lowlatency” package

Use APT to install the “linux-lowlatency” package.

# sudo apt-get install linux-lowlatency

 

Obtain the “ubuntustudio-default-settings” package from the repository – STEP 1

media_1503323148243-1.png

First, let’s visit https://packages.ubuntu.com/. This step is a little less obvious. The package “ubuntustudio-default-settings” contains a file named “09_lowlatency”. This file is a GRUB configuration file we can use to assure our lowlatency kernel is booted first and assures it will stay that way.

 

Obtain the “ubuntustudio-default-settings” package from the repository – STEP 2

media_1503323206179-1.png

Search for “ubuntustudio-default-settings” in the search field. Make sure to select “Source package names” and your distribution. Then press “Search”.

 

Obtain the “ubuntustudio-default-settings” package from the repository – STEP 3

media_1503323294187-1.png

Click on the link named “ubuntustudio-default-settings” to the right of “Binary packages”.

 

Download the compressed file to your Ubuntu server

We will now download the compressed file to our local system.

# cd /usr/src/; sudo wget -q http://archive.ubuntu.com/ubuntu/pool/universe/u/ubuntustudio-default-settings/ubuntustudio-default-settings_0.61.tar.xz

 

Extract files in the downloaded package

Extract the files in the “ubuntustudio-default-settings” file.

# sudo tar xvf ubuntustudio-default-settings_0.61.tar.xz

 

Move the 09_lowlatency GRUB configuration in to /etc/grub.d

We will now move the 09_lowlatency GRUB configuration into /etc/grub.d. This file contains configurations to assure the lowlatency kernel packaage will boot first every time and survive upgrades.

# sudo cp ubuntustudio-default-settings-0.61/etc/grub.d/09_lowlatency /etc/grub.d/

 

Update GRUB configurations

In this step, we update the grub configurations to assure all grub.cfg and related files are consistent after installation of the additional lowlatency configuration.

# sudo update-grub

 

Reboot the system

Reboot the system and check if the new lowlatency kernel is installed.

# uname -r
4.4.0-92-lowlatency

Resurrecting the tech blog!

It’s been over six years since my last technical blog post on “adamstechblog.com”. Time has really flown. Stay tuned for more!

Unstall McAfee Total Protection from Windows Home Server (WHS)

This is a quick article showing how to uninstall McAfee Total Protection from Windows Home Server (WHS). The instructions were not readily available on McAfee’s website as they have removed the KB article “KB64958” from their site.

Here is a link to the uninstaller in case the one mentioned below is not working.

Corporate KnowledgeBase

Additional information for removing Total Protection Service from Windows Home Server

Corporate KnowledgeBase ID:
KB65958

Published:
June 26, 2009

Environment

Microsoft Windows Home Server
Microsoft Windows Home Server OEM implementations
Acer Aspire easyStore
HP home Media Server

Solution

CAUTION: This article contains information about opening or modifying the registry.

  • The following information is intended for System Administrators. Registry modifications are irreversible and could cause system failure if done incorrectly.
  • Before proceeding, McAfee strongly recommends backing up your registry and understanding the restore process. For more information, see: http://support.microsoft.com/kb/256986
  • Do not run a .REG file that is not confirmed to be a genuine registry import file.

If you have to remove Total Protection Service from a Windows Home Server (WHS), it is necessary to remove several registry keys that are removed if you use the following:

  • Add/remove programs
    IMPORTANT: Do not use Add/remove programs to remove Total Protection from WHS. See also KB66148 on severe potential issues.
  • mvsuninst.exe

To manually uninstall Total Protection from WHS:

  1. Download MVSUninst.exe from http://vs.mcafeeasap.com/MC/enu/vs45/bin/mvsuninst.exe
  2. Run mvsuninst.exe
  3. Restart your computer.
  4. Click start, run, type regedit and press ENTER.
  5. Locate and right-click the following registry key, select Delete and click Yes:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Home Server\KnownAdditions\TopWHSaddin.msi.-8589896854554775808]
  6. Repeat the previous step for the following:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Home Server\RegisteredAdditions\{cfcd4bf6-203d-4213-bab4-3c140954287b}]
  7. Restart your computer.
    You are now ready to reinstall the product via the Windows Home Server console Settings screen.

One-Line ncFTP Client Install

ncftp is a client suite offering a command-line interface to commonly-used File Transfer Protocol (FTP).

To install it in one line simply run the below command. Substitute in the most currnet version for 3.2.3

cd ~; wget ftp://ftp.ncftp.com/ncftp/ncftp-3.2.3-src.tar.gz \
tar zxvf ncftp-3.2.3-src.tar.gz; cd ncftp-3.2.3 \
./configure && make && make install; cd ~ \
rm -rf ncftp-3.2.3-src.tar.gz ncftp-3.2.3

Resize /tmp partition on cPanel

It’s quite common for a cPanel server to need a larger /tmp partition.

cPanel, by default, creates a loopback device that mounts to /tmp. The default size is only 512MB. This is quite small, especially for shared systems.

Reasons /tmp might become full:

  • MySQL operation or Repair requiring temporary space. Keep in mind the /tmp partition must be big enough to support the largest table size on your system. (8GB table would require 8+GB /tmp space)
  • PHP sessions consuming space in /tmp
  • Rogue scripts living in /tmp

To resize follow these steps:

** Note that this will stop MySQL and will cause service interruption. These commands will resize /tmp to 2GB. If you wish to resize to a greater or smaller size simply change 2048000 to your desired size in bytes.

/etc/init.d/chkservd stop
/etc/init.d/mysql stop
umount /var/tmp
umount /tmp
sed -i -e 's/512000/2048000/g' /scripts/securetmp
rm /usr/tmpDSK
/scripts/securetmp --auto
cd /tmp
ln -s /var/lib/mysql/mysql.sock
/etc/init.d/mysql start
/etc/init.d/chkservd start

If you receive errors stating that /tmp could not be unmounted simply run the following command to identify the PID (Process ID) still using /tmp

lsof /tmp

Next, kill all processes using /tmp using “kill –9 <pid>”

Virtualize Your Way to a Greener Tomorrow

image Having worked in data centers for the last four years of my life I know that most servers are grossly under utilized. Burning the power to keep servers online that are utilized, on average, five to twenty percent.

Economics, the way they are today, constantly challenges us and pushes us to find new and creative ways to solve problems. Virtualization allows us to provide consolidation for under utilized servers and “pools” resources to allow systems to burst when they need it. Virtualization, in my opinion, is a very green initiative. In this article I will talk mainly about VMware based virtualization technologies.

image

So what are the benefits of virtualizing your servers?

  • Instant ROI – Servers which were underutilized no longer consume power.
  • Ease of Management – Restart systems from a central management location
  • Dynamic Resource Scheduler (DRS) – VMware technology provides the capability to VMotion servers from one physical system to another when extra resources are needed. DRS even weighs the “cost” of moving the machine to another host machine.
  • Capacity Planner – VMware also has utilities to help you plan your virtual environment based on your site’s resource needs. Simply install a utility and let it run for about 30 days. Once the utility has gathered enough data, you will be presented with suggestions
  • High Availability (HA) – VMware offers highly-available services. All of your systems will now have the added benefit of HA at the virtualization layer

So, if Virtualization is so GREEN then what are the downsides?

  • Initial equipment cost is high
  • Use of fast centralized storage (SAN, NAS) is needed; very expensive
  • Systems must match architectures (AMD, Intel) to allow VMotion/HA
  • Systems must support Virtualization Technology (VT)
Conclusion

If you can afford the initial expense, virtualization will save you money in cooling, power and equipment maintenance costs in the long run. I believe virtualization is a great tool to help reduce datacenter costs. Please remember there are things that should not be virtualized: large database servers, exchange servers and some application servers may be too disk intensive for your environment’s abilities. Consider keeping these systems as physical servers.

VPS (Parallels) or VM (VMware ESX)

Ever heard someone use the term VM or VPS? About the only thing they have in common is the V in their name.

A VPS (commonly OpenVZ or Parallels Containers) is a Virtual Private Server and usually runs on what is referred to as a “host node” or the main hardware node. VPS systems allow you to dynamically adjust resources without a restart.

A VM (commonly VMware ESX) is a fully paravirtualized system which all hardware is also virtualized. Many operating systems seem to work the best with paravirtualized systems as the hardware is presented as regular physical hardware.

VMware Pro’s
  • Full Paravirtualazation
  • imageVirutualizes at the hardware level- most compatible
  • Flexibility
  • Industry Standard
  • Can run Windows/Linux/Suse/Novell/OSX all on the same host
VMware Con’s
  • Cannot dynamically scale resources, VM’s must be rebooted to apply new allocations
  • Slightly slower than software-level virtualization
  • Cost, expensive

imageParallels Pro’s
  • OS level virtualization
  • Fast provisioning
  • Dynamic resource allocation, no reboots
  • Tighter control of space and inode allocations
  • Burstable RAM settings
Parallels Con’s
  • Only Linux or Windows VPS systems may exist on a single hardware node
  • Price, although cheaper than vmware, still pricey. OpenVZ is a safe free version.

Conclusion

There are many different solutions to virtualizing or “chopping” up the resources for a single, large host system. Our winner was Parallels for their ease of installation, dynamic resource allocation and faster performance. Also keep in mind that if you are virtualizing systems make sure to have a good backup plan and spare parts or on-site warranty. One large host system may provide 20-50 virtual systems. An outage is now multiplied by the systems you have running on top of your hardware node.

See Why Postini Marked Your Message as SPAM

An E-mail!Ever wondered why Postini blocked your email? Luckily Postni provides their “Postini Message Analysis” tool to assist in tracking down pesky false positives.

Here’s how to run your message through their analysis tool:

Step One

Login to Google Postini’s web interface at https://login.postini.com/ and release your quarantined message.

Step Two

Open your message in your favorite email client. View your message headers and copy everything from the top down to (and including) the line starting with “X-pstn-addresses:”

Step Three

Visit the Postini Message Analysis Tool page and paste in the content we copied in Step Two. Press “Analyze Message”

Step Four

Review your results and see why the message was counted as SPAM.

Another helpful page is Google’s description for what each custom header tag (added by Postini) represents. See this page for more information.

Storage in the Cloud

1216703_58267031_web

Caught up in “cloud” technology? Think it’s useful or just some hype? This post will provide an extensive review of the pros and cons of cloud storage. We’ll also provide a definition of “cloud” storage and the difference between a public and private cloud.

Cloud Overview

There are a few different types of cloud storage. The main goal of the term “cloud” is to separate and decentralize storage. Systems should be expected to fail, fail often (more often than enterprise class hardware) and be easily replaced when they do. There are many providers of public cloud storage and quite a few vendors which provide cloud storage software so you can start your own cloud.

Public Cloud Providers

Private Cloud Providers (Software)

Cloud Benefits

There are many benefits to utilizing cloud storage. One of Powering Cloud Storagethe best benefits of using public storage is to diversify and distribute storage across the nation. Utilizing a private cloud allows you to decentralize your storage and possibly speed up largely parallel reads and build fault tolerance into your storage systems. I’ve personally had experience with ParaScale and it seems to work great. The software allows you to build your own private cloud storage system. In testing it has proved to be very fast and efficient.

Cloud Cons

Utilizing a public cloud can be a bit scary for some. Of course it requires a level of trust and assurance to allow your data to be on a public system. I’m sure most responsible persons will keep copies of their data elsewhere beside a public cloud. Private clouds are still somewhat new and require special software. If the software (or any underlying proprietary system) fails, it will require custom services (provided by the software vendor) to recover the data. Private clouds can be very helpful but we must weigh the benefits against the risks.

Conclusion

Cloud storage has been very successful in both private and public practice. Cloud storage provides cheap and distributed storage for files and can add speed if used privately. This technology is still very new and it must be considered with a “grain of salt” – we’re talking about our data here! In conclusion, Cloud storage technology is very efficient, decentralized, highly fault-tolerant and can offer us many benefits. The only way for the technology to mature is to provide more use and refinement. When cloud storage platforms are fully matured we can place more hope in the “cloud hype.”

Facebook – The New MySpace?

Remember when Facebook was fast, purpose-built and generally beat the pants off MySpace? That doesn’t necessarily seem to be the case anymore. With all the extra bloat, advertisements and the insufferable “apps” available now it’s hard to remember what the real purpose of Facebook was- To communicate.

 

It seems like once they opened registration to all, allowed user-created apps and tried to keep being everything to everyone the purpose and Facebook message has disappeared.

 

The Pros

* Facebook is a LAMP (Linux, Apache, MySQL, PHP) powered system. They have great technology behind their site and have developed many interesting technologies around their core applications.

* Facebook is still very “light” compared to other social networks (e.g. MySpace)

* Large user base (who hasn’t heard of Facebook?)

* Find people you’ve been searching for from way back (also see Cons for the opposite of this)

 

The Cons

* Insufferable annoying Apps that seem to do absolutely nothing but clutter my “requests” section. I don’t care if someone superpoked me or gave me a flower. I can’t believe people pay to send these things.

* Open to everyone. (This isn’t necessarily a bad thing as long as the openness doesn’t contribute to what Facebook has become)

* Too many ads, too much clutter. Get back to what Facebook was supposed to be!

* People you didn’t want to know you or check up on you can (unless you block them)

* Allows for some “social stalking” How many times have you talked to someone else on Facebook in real life only to have them bring something up from the social network? Great.

* Time vampire. I believe that there are quite a few people out there addicted to this particular social network.

 

Conclusion

While I use Facebook sparingly, I can say that it has a purpose but it has been a bit over-done. I believe that simple is better. Facebook, can we have the site from about a year ago back? Can there be a “bloat-free” lite version available? How do I get rid of all the junk that has been added over the years? Please make us a version that is simple, works and provides what Facebook originally set out to do.