performance

Using fslint to take control of your filesystem openSUSE

Tuesday, October 28th, 2008 | SuSE Linux, Techie | 3 Comments

fslint is a great tool to help you maintain a clean filesystem by finding empty directory, duplicate files, temporary files, and broken sym links (among other things). One of the great features of fslint is it comes with a gui version called fslint-gui (imagine that).

To get, build and install fslint do the following:

wget http://www.pixelbeat.org/fslint/fslint-2.28.tar.gz
sudo rpmbuild -ta fslint-2.28.tar.gz
sudo rpm -Uvh /usr/src/packages/RPMS/noarch/fslint-2.28-1.suse.noarch.rpm

Note:If you use ubuntu you can install with:

sudo apt-get install fslint
or
sudo aptitude install fslint

Now run:

fslint-gui

First I would remove everything in the “Search Path” and add what you want to search no by clicking “Add”.
Add
Note: Here you can choose what type of scan you want to do (recursive etc).

Now it’s as easy as clicking “Find”
Find

Once the scan is completed it’ll fill out the selected section with its findings:
Options

In my “Duplicates” section you can see I have many duplicates
Dups

I can either delete them here by clicking on them and choosing “Delete”
Delete

Or feel free to use it how you want. You can just take the output save it, and clean manually, or you can use it just to see what you might have out there.

I highly encourage you to check it out, try it on some folders in your home directory, just remember the bigger the directories being scanned, the longer the scan will take. This will also help you better understand your machine, and where you save your data :o)


Tags: , , ,

Boost libraries making their way into mainstream openSUSE

Monday, October 27th, 2008 | SuSE Linux, Techie | 2 Comments

Today I did an update of factory using:

sudo zypper up -t package -r Factory\ Repo

To pick up the new updates. I checked out the new packages to be installed and removed and to my surprise I found taht most the boost packages have no been marked to be installed, this in the main stream installation of openSUSE 11.1. I’ll be interested to see if they all get installed by default with a new installation (I imagine they will).

Here’s all the boost packages being installed on my machine right now:

libboost_date_time-gcc43-mt-1_36-1_36_0 libboost_filesystem-gcc43-mt-1_36-1_36_0
libboost_graph-gcc43-mt-1_36-1_36_0 libboost_iostreams-gcc43-mt-1_36-1_36_0
libboost_math-gcc43-mt-1_36-1_36_0 libboost_mpi-gcc43-mt-1_36-1_36_0
libboost_program_options-gcc43-mt-1_36-1_36_0
libboost_python-gcc43-mt-1_36-1_36_0 libboost_regex-gcc43-mt-1_36-1_36_0
libboost_serialization-gcc43-mt-1_36-1_36_0
libboost_signals-gcc43-mt-1_36-1_36_0 libboost_system-gcc43-mt-1_36-1_36_0
libboost_test-gcc43-mt-1_36-1_36_0 libboost_thread-gcc43-mt-1_36-1_36_0
libboost_wave-gcc43-mt-1_36-1_36_0

As you can see the newest versions are being implemented (1.36.0). I wonder if we’ll get 1.37.0 which is due to be released at the end of October.

If you haven’t read the improvements that Boost can bring, or just want to learn more about it I’d highly recommend check it out at www.boost.org

I haven’t seen any openSUSE notification that boost was going to be included, so why the hush hush?

Tags: , ,

Speed up your Linux Boot and normal use ( openSUSE )

Sunday, October 26th, 2008 | SuSE Linux, Techie, Ubuntu / Kubuntu | 9 Comments

In a world where faster (in most sense) is better, people are always looking for ways to increase the efficency of their computers. While i’ve read other peoples thoughts and recommendations regarding speeding up your linux installation, many I just clearly do not agree with. Here are things I have done, and things I could/would have done if I was on less adept hardware:

First: I want to get out that clearing the terminals launch at boot via /etc/inittab will not help as much as many guides try to say. This uses just a very minute amount of RAM, and you’ll rarely see a difference. However if you do feel you want to chage this, you can disable (comment out) the following lines in /etc/inittab:

3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

I recommend not removing any more then those. Again, this will give you minute gains in RAM usage.

Second: A great practice on any operating system (Microsoft and Linux alike) is to disable un-needed processes. This can be done quite easilly via YaST. To do this open YaST, click on System and click on System Services (Runlevel) see Figure 1. (note if you do not see this run the following to install it:)

sudo zypper in yast2-runlevel

YaST Runlevel
Figure 1

Things I have disabled are:
joystick (I do not run any joystick etc)
nfs (I don’t attach to any NFS mount points)
ntp (I don’t care to attach to any NTP source)
(Note: I won’t tell you which ones TO disable as it is up to you to determine WHICH services are not needed, be sure you know what you are doing here.

Note: In Ubuntu the application that will do this for you is sysv-rc-conf. You can install it via:

sudo aptitude install sysv-rc-conf

Third: Is a great and simple way to increase the effectiveness of the RAM on your machine. This modification will allow more of your process to be stored into memory and not be sent to your swap (RAM is faster then Disk).
Note: This modification is for the machines with quite a bit of extra RAM to hand out and not for systems that lack usable RAM.

First you can check what your current swappiness level is (the higher the swappiness setting, the more often it will write to your swap (again which is located on disk). You can do this by running:

cat /proc/sys/vm/swappiness

I believe openSUSE ships by default at 60, but most distributions ship with swappiness set to 50 - 60.

Now to test this setting before making it permenant. You can run:

sudo sysctl vm.swappiness=0

If you feel the performance gains, are good, or you just feel like setting it permenantly you must modify /etc/sysctl.conf. To do this edit the file in your favorite editor:

gnomesu gedit /etc/sysctl.conf
kdesu kwrite /etc/sysctl.conf
sudo vi /etc/sysctl.conf

Add the following line to the end of /etc/sysctl.conf:

vm.swappiness = 5

(Note: You can choose your value, the lower the value the less swapping that will take place).

Fourth: Disable IPv6 if you will not be using it. I won’t go too far into this, you can do this in YaST –> Network Devices –> Network Settings.

Fifth: Tune your applications.
OpenOffice.org Will allow you to change it’s memory consumption. You can do this by opening any OpenOffice.org application, then going to Tools –> Options –> OpenOffice.org –>> Memory. You can play around with this setting for your need, but changing the number of graphics in cache, and increasing the amount per object may be quite useful.

Compiz Most people consider this to be a great “eye candy tool”. I honestly consider it a functionality and productivity tool and use it for this function day by day. If you NEED to run it, make sure you trim what plugins load, and just slim it down to the functional features you use. If you don’t need Compiz just disable the desktop effects. This will free up a good amount of resources.

Sixth: Replace bulky applications:
Firefox I actually didn’t want to touch on this because FireFox 3.1 looks like it will actually lower the memory consumption by Firefox, but with that said, 3.1 is in Alpha (or pre-Alpha so I have to mention this). Use Opera, which can be install via:

sudo zypper in opera

.
Opera is a full feature browser, and uses quite a bit less memory and overall resources then firefox does. If you’re running KDE you also have the choice of Konqueror, but again I would highly recommend Opera if you’re low on resources, or looking to conserve.
OpenOffice.org You have many other word processors avaliable to you in Linux. If you just need a basic editor use gedit, kwrite, or if you need a more feature full processor and can’t afford the hit from openoffice use obiword, or koffice.

Change your Desktop Environment. Most people will run GNOME or KDE. Those are some of the higher resource intense DE’s and on a machine where resources are really in need can be replaced with lightweight DE’s like XFCE (blackbox, enlightenment, icewm (note: these ones are for more advanced users)). XFCE can easily be installed via YaST. To do this open YaST –> Software –> Software Management. Under Filter choose Patterns and check the XFCE Desktop Environment option.
(Personal Experience: I find that KDE uses fewer resources then GNOME, and find it’s functionality to be even greater. This is one reason I have chosen openSUSE over Ubuntu. Sure, you can install Kubuntu or KDE packages within Ubuntu, but it is not developed upon like it is on openSUSE).

Those are the basic things that can be done to help speed up your machine for daily use, and to speed up your boot process.

Now onto some other things that I’ve done on my machine just from personal experiences:
Run

ps -ef | more

Check what is running that I don’t really need. Kill the process. After i’ve killed the processes I don’t care for I save my session ( I do this because I have my KDE set to start on the last manually saved session ).

Another modification I’ve added to try to increase performance with EXT3 is adding

noatime,nodiratime

in my /etc/fstab mount point for my /home.
This is how the line looks in fstab:

/dev/system/home /home ext3 acl,user_xattr,noatime,nodiratime 1 2

Install a Vanilla Kernel. This will remove all the patches installed by the SUSE developers, but will increase your boot time by about 10 - 15% (dropped my boot time by about 8 seconds). This is for advanced users, if enough people as for this, maybe i’ll blog about it.

I also removed that damned dog Beagle, and the security feature apparmor. I removed beagle because most my files are kept on a offline disk, and again this is one of the main reasons I removed apparmor.

I’m sure i’ve done other things, and I just can’t remember right now. I’ve just pulled these off the top of my head and can’t really think of anything as it is bed time.

Shameless plug: You can read a previous posting of mine which will allow you to check your before and after boot times. Check out the posting here for that.

Hope this helps someone and please feel free to add your comments to make this a better comprhensive list.


Tags: , ,

Using bootchart to capture your boot process openSUSE 11

Tuesday, October 21st, 2008 | SuSE Linux, Techie | 5 Comments

Have you booted up your computer and wondered, what is really going on here. Why is it taking so long, or how could a new kernel, or a kernel modification help speed up my boot. Well wonder no more.

There is an application for Linux called Bootchart, which allows you to do just that. First, lets install it and see what we get. To install on openSUSE just run:

sudo zypper in bootchart -y

You now have it installed, but now what? Here you can either type in init=/sbin/bootchartd in the grub menu box, or (this is the approach I took) add an entry into grub’s /boot/grub/menu.lst. For this example we will be utilizing YaST, to copy our current default Grub entry and modify to work with bootchart (you only have to log into this option when you want to chart your boot process).

To do this, do the following:

Log into YaST, go to System on the left hand side, and click on “Boot Loader” in the right hand pane.

YaST

This will bring up the Grub Menu Editor, Next Click on the choice that has the check mark next to it (this is your default kernel option that gets chosen when you boot).

YaST

Now click on “Add”, and choose the “Clone Selected Section” option

YaST

Click “Next”, now in the “Optional Kernel Command Line Parameter” field, put in “init=/sbin/bootchartd” (without the quotes) and assign a reasonable name (I try to keep the name the same as my copied selection, and add - BootChart to the end).

YaST

Click on “Ok” and verify you see the new option in your list of Grub menu choices:

YaST

Now it is time to reboot your computer and at the Grub menu, choose your new Grub menu option that was just created.

Ok, cool.. So what did that do?
It actaully created a compressed file in /var/log named bootchart.tgz. But having just that file would do nothing for you, since it’s not in a readable format.

So here is where we work all the magic. To format what we just made into a usable format run:

sudo bootchart –format png

Important Note: That is 2 -’s not a single -, 2 different ones - -
Note: at this point you can format it as svg, png or eps by changing the last option.

Here is an example of what you’d get:
Bootchart

Now, you are all done. You can wow your co-workers, impress your bosses, or do whatever you want to your kernel to try to trim that time down. Now when you next log into your kernel, you just continue going into your original default option, and the next time you want to chart your boot time again, just go back to that option added. If you’re going to do a new kernel to test the new kernels speed, make sure you add the init=/sbin/bootchard to the kernel params when you put it into grub.

Here you can see a comparison I did to see what I would gain from compiling a kernel with just a fewer options (I didn’t want to take too much time and hammering out a very thing kernel, just to show the usage of the tool for this write up, but here are two of my charts).

Vanilla 2.6.27.2 Kernel
SUSE 2.6.27.1 Kernel from openSUSE 11.1 Beta 3

I hope you enjoyed this write up, and with all the extra time on your hands you should check out:
BootChart.org as they obviously have good material there regarding bootchart.


Tags: , , , ,

Search

Polls

Do you think having RDP on a Linux Host important in the enterprise space?

View Results

Loading ... Loading ...

Powered by