Snakeoil

From Snakeoil OS Reference
Jump to navigation Jump to search

!icon.png This page is available in activated editions only.

This tab contains a lot of experimental (unstable) features yet to make it to the public domain. Only people with a activation code can unlock this functionality (more commonly known as beta testers).

These features can be highly unstable so please try them at your own risk.

Snakeoil

Software

Software consists of music software and Ubuntu packages.

Music Software

Use this to install/uninstall software easily. Uninstall anything you don't need to reduce clutter, or install new players as they come.

Snakeoil - music software

Please note the list of music players above may change over time.

Ubuntu Packages

You can install additional Ubuntu packages to expand the capabilities of your Snakeoil OS.

SO Ubuntu.jpg


Ubuntu Package Description
cpuset Install this package to and you can assign individual programs are run on your multi-CPU computer. See next section on cpuset for more information.
exFAT filesystem exFAT (Extended File Allocation Table) is a Microsoft file system introduced in 2006 optimized for flash memory such as USB flash drives and SD cards. Install this package and you can mount any media formatted with this format.

System Services

You have the choice to disable these services. Doing so will increase RAM, which may in turn yield benefits (or not).

Snakeoil - System Services
  • OpenSSH: For remote access to your computer via putty
  • Console: For local access to your computer
  • SMB Windows File Sharing: This is the file sharing protocol you used for copying files to your Snakeoil machine over the network. Turn this service off when you don't use this feature. Turn it on again when you need to copy more files over.
  • Avahi-daemon (Bonjour): Allows novice or non-power computer users to easily network to one or many devices.


You will not be able to gain access to your Linux OS when you disable both SSH and TTY. The only way is remote log in again is to enable either one from the web interface. You will be locked out of the system if you disable these two services and loose network connectivity.

Hardware

In this section, you can introduce tweaks that can potentially improve the sound quality.

RAM Disk

Introduced in Blind Testing U7. This feature allows you to create a RAM disk to play music off it.

You can dedicate a portion of your RAM and convert it into a RAM drive if you have ample RAM available on your media PC. A RAM disk has no moving parts, so it's like an SSD, only faster. RAM is one of the lowest latency memory device on a PC. There could be a benefit in audio quality if music is played directly off a RAM disk. This will also be the shortest path (RAM → RAM → CPU → Audio Device) rather than SSD → RAM → CPU → Audio Device.

Playing music off a RAM disk cuts off any latency between SSD → RAM.

RAM Disk Configuration (with unusually large free RAM!)

Amount Of RAM free

The amount of RAM free varies over time. For stabiliy reasons, it's best to assign a RAM disk that's well under the available free space. This frees up the RAM to act as cache which will speed up the speed of your entire operating system. Depending on your point of view - balancing the size of your RAM vs amount of RAM for caching is a tweaker's joy, or nightmare. If you are unsure, start with a RAM disk size to fit one album (approx. 600 MB).

RAM disk Type

You have a choice of two RAM drive types - tmpfs vs ramfs.

tmpfs

tmpfs has more checks and balances. You'll never run out of memory with this type. If your system runs out of space, the Operating System will automatically swap out unused memory blocks into swap space. The upside is increased stability. The downside is memory swapping incurs a penalty and may result in lessor audio quality.

ramfs

This is the more unstable version of a RAM disk. The Operating System will not swap out your memory. If you specify a size that's too big and the system has run out of RAM, the whole machine will freeze in ithe worst case scenerio. The upside is you are assured of the lowest possible latency in music playback. The downside is you got to really know what you're doing.

Non Persistent Storage

The downsides of a RAM disk is the contents are not persistent. Every music in the RAM disk will disappear after a system reboot or a power off. So remember to only copy files over to the RAM drive and not move them. Your files on the RAM disk will disappear after a reboot, shutdown or power cut.

Using RAM disk

You can load music to RAM disk using Browse. You can copy individual tracks, or copy content from music folders and playlists. Playlists are useful when there are many tracks across multiple folders.

Browse RAM disk

With Browse, you can view music loaded into RAM disk by double clicking on [ram]. Depending on your player, the music will either show up automatically or not (do a database rescan or equivalent refresh).

Album art

If your player uses embedded album art in a music track, then using RAM disk will be no different to other storage. Depending on your player, you may need to refresh or re-scan album art. If you encounter problems, clear the album art cache. Your player will then take a fresh copy of the embedded album art.

However, if your player requires an external album art file (e.g. folder.jpg), it is better to have only 1 album in RAM disk. Otherwise, all the music in RAM disk will use the last loaded external album art file. If you load music into RAM disk with a playlist, you will see either no album art or a previously loaded external album art file in RAM disk.

For players which can do both embedded album art and external album art file, results can be unpredictable. If possible, use embedded album art only.

cpuset

From Wikipedia.

Processor affinity, or CPU pinning, enables the binding and unbinding of a process or a thread to a central processing unit (CPU) or a range of CPUs, so that the process or thread will execute only on the designated CPU or CPUs rather than any CPU. This can be viewed as a modification of the native central queue scheduling algorithm in a symmetric multiprocessing operating system. Each item in the queue has a tag indicating its kin processor. At the time of resource allocation, each task is allocated to its kin processor in preference to others.

Processor affinity takes advantage of the fact that remnants of a process that was run on a given processor may remain in that processor's state (for example, data in the cache memory) after another process was run on that processor. Scheduling that process to execute on the same processor improves its performance by reducing performance-degrading events such as cache misses. A practical example of processor affinity is executing multiple instances of a non-threaded application, such as some graphics-rendering software.

Snakeoil OS runs a very simplistic but effective model for processor affinity:

Snakeoil - cpuset


  1. Do you want to restrict your music programs to a CPU group?
    • Yes: Tick the box that says ' Isolate music player to (user), leaving everything else in (System)'
    • No.: Untick the box that says ' Isolate music player to (user), leaving everything else in (System)'
  2. If you chose Yes above, you now get to  decide which CPUs run all your music applications in one group, and everything else in another group. While this does not offer much flexibility, in most cases you should hear an improvement in audio quality.

Make your changes, and do not forget to hit the 'Save' button at the bottom of the page for all your changes to take effect.

Process Priority

How various programs are executed in Linux to give you that multi-tasking ability is determined by something call a process scheduler. How it all works is beyond the scope of this manual, because it largely dependent on the technique (plus other stuffs). Suffice to say if you are using a cooperative scheduler then you can use this option to fine-tune how often a process gets "looked at" in the queue. Snakeoil kernels with RT patches are all preemptive so this option is probably useless.

Snakeoil - process priority

Click on the "Add Process" button to add a new process. In the process name field, enter the name (or part of) of the process you wish to reassign a new priority. The prio field is the new priority level you want this process to be set to (this field is numeric only, with 1 being lowest priority, and 99 being real-time). Note that we only adjust the priority level here and not the scheduler policy. The later is really reserved for advanced users and not for general use.

Programmable USB ports


Enable programmable USB ports

Some USB ports can be controlled by a program e.g. start or stop. Enable if your motherboard allows for this.

Linux Kernel

Linux Kernel has parameters you can specify for the boot kernel. Changing these settings will alter the behaviour of the booted kernel, and that in turn can influence the sound. These settings are experimental and the system may fail to boot, or become unstable. Please try these settings at your own risk.

Snakeoil - Kernel Tweaks

Boot Kernel

You can upload kernels to your Snakeoil machine. The last uploaded kernel is always set as the default boot kernel, use this setting to override that behaviour and use a previous kernel as your default.

Clocksource

The purpose of the clock source is to provide a timeline for the system that tells you where you are in time. For example issuing the command 'date' on a Linux system will eventually read the clock source to determine exactly what time it is. The clock source shall have as high resolution as possible, and the frequency shall be as stable and correct as possible as compared to a real-world wall clock. It should not move unpredictably back and forth in time or miss a few cycles here and there.

Some common clock sources are:

Boot options

These are additional command line options for the kernel. Please note these options while well tested in Linux may not be compatible with your hardware configuration. If the kernel fails to boot you'd need to manually modify the boot up options from the console to recover.

Options Description
none No special boot parameters
acpi=noirq Do not use ACPI for IRQ routing or for PCI scanning
acpi=ht Disable all ACPI functions, except what is required for hyper threading
noapic Tells the kernel to not make use of any IOAPICs that may be present in the system.
pnpacpi Not sure what this does - does it turns on Plug N Play ACPI, or off?
nolapic Do not enable or use the local APIC.

 Main   Configuration    File Manager