Archive for the ‘Activism?’ Category

Intel Graphic cards, Linux, Xorg and UXA performance boost

Sunday, June 21st, 2009

For people having Intel graphic chipset under Gnu/Linux, performance using 3D applications or Compiz-* window manager effects has always been a problem. Intel drivers for Xorg never gave problems but have also never been brilliant. I always looked around searching for xorg.conf tuning configuration entries.
Today I was simply browsing Ubuntu Wiki and discovered the UxaTesting page. I wanted to know something about UXA and Intel drivers, so I found a Wikipedia definition:

In computing, UXA is the reimplementation of the EXA graphics acceleration architecture of the X.Org Server developed by Intel. Its major difference with EXA is the use of GEM, replacing Translation Table Maps.

Yeah cool, the official Xorg Wiki Intel Graphics Driver page Gives also some more information, so if you've got one of these chipsets (you can verify using lspci | grep VGA ):

  • i810 and variants thereof
  • i815
  • i830M
  • 845G
  • i852GM
  • 855GM
  • 865G
  • 915G and variants (GMA 900)
  • E7221
  • 945G and variants (GMA 950)
  • 946GME
  • G33
  • Q33
  • Q35
  • 965G/Q
  • G35
  • G41
  • G43
  • G/GM/Q45

You may want to try out the new acceleration method by adding this line


Option "AccelMethod" "uxa"

To your /etc/X11/xorg.conf file, in section "Device".

Please note that:

  1. UXA is not yet stable as EXA. Try it out, signal your experience on the Ubuntu wiki page and fill out a bug if necessary
  2. You will need at least Xorg server 1.6.0
  3. You will need at least xf86-video-intel-2.6.2 drivers
  4. I don't think this is mandatory, but please tell me if you encounter differences when updating to 2.6.30.x kernel. I already have 2.6.30.0 on Sid so I don't know if with a previous version this is working

On Debian Sid I just had to add the Option line to my xorg.conf file.
The performance differences are noticeable and incredible. Everything runs faster and smoother.
My glxgears output went from 60 FPS (using EXA) to 425 FPS (using UXA).
This is a 700% performance improvement!

  • Share/Save/Bookmark

A major revision for my publication about Object-Oriented Memory Management

Friday, April 10th, 2009

It took about a year for a major revision of my document about memory management in object oriented programming languages.

This major revision adds C++ in addition to Java.

The paper is about a model for memory management during the execution of programs written in Java and C++.

The number of pages grew from 17 to 28.

You can see more information and download the pdf on this page.

I hope you will find it useful to model your programs and know how memory is handled.

  • Share/Save/Bookmark

Introduction to HTTP mind-map

Sunday, March 1st, 2009

As I promised about 4 hours ago, here is my introduction to Hyper Text Transfer Protocol in form of a mind map.
It is to be intended as a really short introduction to this protocol. Like the previous one about computer networks, the mindmap summarizes materials copyrighted by Tanenbaum and also material taken from Wikipedia.

The topics covered are:

  • Scope of the protocol
  • HTTP connection
    • HTTP/1.0
    • HTTP/1.1
  • HTTP request methods:
    • GET
    • HEAD
    • PUT
    • POST
    • DELETE
    • TRACE
    • CONNECT
    • OPTIONS
  • Message Headers
    • Request Headers - all
    • Response Headers - all
  • Status Codes:
    • 1xx Information
    • 2xx Success
    • 3xx Redirection
    • 4xx Client error
    • 5xx Server Error
  • Sessions:
    • Cookies
    • Server-Side sessions
  • Secure HTTP - HTTPS:
    • By URI scheme
    • HTTP Upgrade Header
    • SSL/TLS

You can browse an HTML version online.

You can download:

As always, you are free and encouraged to contact me in case of errors or anything else.
Hope you like it!

  • Share/Save/Bookmark

Introduction to Network Organization mind-map

Saturday, February 28th, 2009

For Internet Technologies and Distributed Systems courses we have to study some basics about network organization and architecture. The most interesting book on the topic is the one written by Tanenbaum (Computer Networks ). I have to study the parts about network organization and HTTP. For my studies I sometimes make use of mindmaps, so here I provide my mindmap that summarizes an introduction about network organization.

The topics covered are:

  • Layers (or levels):
    • Advantages
    • Services
    • Quality
    • Primitives
  • Protocols
  • Models:
    • OSI ISO
    • TCP/IP

Please note that the mindmap summarizes materials copyrighted by Tanenbaum and also material taken from Wikipedia.

You can browse an HTML version online.

You can download:

How to have both Mac Os X and Linux installed and share the same home directory files

Friday, February 27th, 2009

So much time since my last post! I'm sure that the best way to come back to blog posting is a nice tutorial.
I'm going to write how to have the same home directory shared between Mac Os X and Gnu/Linux. Let me call Gnu/Linux just Linux from now on.

A unique place for your working directory on both Mac Os X and Linux!

The configuration I'm proposing should be very confortable, as it works with symbolic links.
It lets you to boot either Mac Os X or Linux and have the same directories and files for your everyday use. Meanwhile, the important configuration files and directories (e.g. ~/Library for Mac Os X, ~/.config for Linux) are kept separately on their corresponding partitions.
Another advantage of this configuration is that you can have a small partition dedicated to Linux - let's say 10GB but could be even less - just for installing the programs you need, while your videos, documents, music files are kept inside the biggest partition, the one for Mac Os X.

Disclaimer, assumptions

Basically, you will mount your Mac Os X root partition in Linux, and soft-link your important directories to your Linux home directory.
You will then use them as there were real directories in your Linux home directory. For this how to, there are a couple of things I assume that:

  • You have Linux installed and running natively on your Mac(Book). I'm going to give commands with sudo, so configure it if you're not using Ubuntu-based distros!
  • You know your partition layout. The following is mine. I'm going to use it as example:

    disk0s2 /dev/sda2 MacOsx /
    disk0s3 /dev/sda3 Linux /
    disk0s4 /dev/sda4 Swap

  • You have a clean Linux home directory. This means that you don't have directories whose names are in conflict with those on your Mac Os X home directory
  • You are going to disable file system journaling on your Mac Os X root partition! Please read carefully this Wikipedia page about journaling and this Apple page about HFS+ journaling if you need more information.

Boot Mac Os X

Follow these instructions under Mac Os X:

Open a Terminal.

Identify your Mac Os X root partition:

$ sudo diskutil list

/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *111.8 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS MacOsX 99.9 Gi disk0s2
3: EFI 10.7 Gi disk0s3
4: Linux Swap 1.0 Gi disk0s4

Disable file system journaling for the partition:

$ sudo diskutil disablejournal disk0s2

Do a ls -n of your home directory to discover your user id uid:

$ ls -n

total 0
drwx------+ 11 501 20 374 25 Feb 17:43 Desktop
drwxrwxrwx+ 32 501 20 1088 26 Feb 18:19 Documents
drwxrwxrwx+ 8 501 20 272 26 Feb 18:06 Downloads
[Few Others ...]

My UID is 501. Keep your UID in mind, you will need it under Linux. You obtain the same results by using the command "id".
Reboot your Mac.

Boot Linux

Follow these instructions in a linux shell.

Change your Linux user id (UID). To correctly share the same home directory between both OS, you need to have on Linux the same UID of your Mac Os X user.

sudo usermod -u <uid> <username>

(sudo usermod -u 501 bodom_lx in my case)

To have your new UID applied, either reboot or logout from every shell you opened, even from your desktop environment. Login again.

Create a directory in which you are going to mount Mac Os X root partition:

sudo mkdir /media/</strong>MacOsX</strong
sudo chmod 775 /media/</strong>MacOsX</strong>

put this line at the end of /etc/fstab, as root, with your favourite editor:

/dev/sda2 /media/MacOsX hfsplus rw,nosuid,nodev,uhelper=hal 0 0

Remember to change sda2 and MacOsX

Either reboot the system or type:

sudo mount /media/MacOsX

To mount your Mac Os X root directory in your mount point directory.

Now cd to your Linux home directory and begin to soft-link all of your important Mac Os X directories. Here are some of those I needed:

ln -s /media/MacOsX/Users/bodom_lx/Documents/ .
ln -s /media/MacOsX/Users/bodom_lx/Pictures/ .
ln -s /media/MacOsX/Users/bodom_lx/Projects/ .
[...and many more...]
 

Don't soft-link the Library directory.

Conclusions

Now you have the same important files shared on both Mac Os X and Linux, while the important hidden configuration files are kept in separate phyisical places.
You can listen to your Itunes mp3 collection on both operating systems. You can now develop programs under Gnu/Linux. You can reboot your machine to Mac Os X and take notes during the lectures, and so on! Hope you liked this how to, and comment it as well. Contact me if you find some mistakes or you're in trouble!

  • Share/Save/Bookmark

2009 is a Zen year! Announcing BD-theme Zen

Monday, January 5th, 2009

2008 has been a

chaotic, beautiful, uncertain, loving, annoying, sad, inciting, exciting, claustrophobic, happy, insecure, agoraphobic, free, ugly, closed, wild, lonely, impetuous, serene, safe

year for me. It has been a year of changes.

I would like to enter this new year in a Zen way. I would like 2009 to be a year of tranquillity and serenity.
I want to free me from heavy, non-important details. I want to be more minimalist.

I want to focus on essence rather than on appearence.

While I'm preparing to act in this way, you can enjoy mi first step, the most easy one: a new Wordpress theme.
You can see BD-theme Zen working on my blog, but you can also download it and modify it under the Gnu GPL license (v.3)

Enjoy.

  • Share/Save/Bookmark