Friday, November 19, 2010

Faster and More Responsive Desktop in Linux

Faster Linux Desktop - Changing the scheduling paradigm to increase responsiveness for desktop useage

Came across an interesting article about speeding up the desktop usage in linux by altering the threading and process scheduling algorithm.

More details can be found here :

My question is would this change performance for servers that have no graphical user interface running IE xorg? It looks like it won't!

Postgres unable to start with shmget. SHMMAX too small

Error Starting PostgreSQL, Could not create shared memory segment errors

If you have a large PostgreSQL configuration that supports many concurrent requests, you may find yourself starting it as you have increased the shared_buffers parameter or max_connections parameter, and it fails to start.

The error message will say something like could not create shared memory segment, Failed system call was shmget. This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. SHMMAX too small.

Here is the exact error message I got:

debian-testing:~# /etc/init.d/postgresql-8.3 start
Starting PostgreSQL 8.3 database server: mainThe PostgreSQL server failed to start. Please check the log output: 2010-11-17 13:53:34 EST FATAL: could not create shared memory segment: Invalid argument 2010-11-17 13:53:34 EST DETAIL: Failed system call was shmget(key=5432001, size=147382272, 03600). 2010-11-17 13:53:34 EST HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 147382272 bytes), reduce PostgreSQL's shared_buffers parameter (currently 16384) and/or its max_connections parameter (currently 503). If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for. The PostgreSQL documentation contains more information about shared memory configuration. failed!

PostgreSQL Debian increase SHMMAX

In order to increase the maximum amount of shared memory a linux program can access, we need to adjust kernel parameters. Since we are using Debian they are available in /etc/sysctl.conf. This should be similar for many linux distributions.

We simple edit this file:

sudo vim /etc/sysctl.conf

or if you have GNOME running

sudo gedit /etc/sysctl.conf

And either search for the line or add the line (most likely will have to add) :

kernel.shmmax = 147382272

Note the number here is the same as "size" in this system call, shown in my error message above: shmget(key=5432001, size=147382272, 03600)

Now we have to put these settings into effect by running the command

sysctl -p

And now we start PostgreSQL up without the error:

debian-testing:~# /etc/init.d/postgresql-8.3 start
Starting PostgreSQL 8.3 database server: main.

Thursday, November 18, 2010

Intel OpenCV Open Source Computer Vision Software

Face Tracking, Motion Tracking, OpenCV - Free Computer Vision Library

Was looking into how to do face tracking and possibly motion tracking. With face tracking I was hoping I could find a way to track facial expressions, ie the eyebrow position, mouth position, as is done with many CG characters nowadays. OpenCV is an open library by Intel that allows you to carry out various computer vision tasks. Facial tracking is one of the demos that comes with OpenCV.

How OpenCV's facial tracking works can be described in great detail

You can find out more about how OpenCV's facial tracking works here :

Check out Intel's OpenCV library - computer vision

Check out the a wiki for more detailed information here :

Face Tracking OpenCV - Cool demo on youtube

Tuesday, November 16, 2010

Mozilla's HTML 5 Audio API Draft

HTML 5 - Mozilla's Draft for the Audio API

Defining an Enhanced API for Audio (Draft Recommendation) by Mozilla

Was looking into writing a html 5 script that can generate tones given a frequency (ie 440 hz for 'A') . Alas, it seems out of my reach for now as Mozillas Audio Writing API does not appear to work in my version of firefox. Cmon people lets get moving!

Cool Examples

Toy Piano
Javascript text-to-speech engine

Let me know if any of these work for you, because they don' work for me :(

Monday, November 8, 2010

Site Launch

New site has been launched. Lets watch the SEO value... lots of competition out there

New! Speed of Flow tabs by The Rodeo Carburettor