July 19, 2012 § Leave a comment
living the real life, working the real job, talking the real talk…this is what makes you explore the real valuables in the world
you will know it, when real life happens
the past few days i lived in my dreams.
i showered in the lake and dried up on warm flat stones.
i pumped the water from the lake to the house.
i slept watching the starts and listening to the calming sounds of the waves.
i woke up with the morning breeze and the sun shining on my face.
i drew things.
i read my book.
i helped with the sales at the giftshop.
i drank strawberry house wine.
i explored caves.
i got lost in the forest.
i cleaned the compost toilet after visitors left the island.
i stored food in the basement.
i watered the plants using pails from the lake.
i filtered my drinking water.
i danced in the sun and sang by the water.
i washed my clothes in the lake and let them air dry.
i talked to strangers and listened to their stories.
View original post 15 more words
September 16, 2011 § 1 Comment
if you are building a system that uses solid state drive (ssd) which is a must if you are making industrial equipment that needs storage, make sure the operating system you use supports trimming. now that the solid state drives are widely used because of their price being comparable to the traditional drives’, operating system companies are adding the trim command support to their oses.
the trim command is introduced due to the difference in writing and over-writing performances on the solid state drives as opposed to the traditional moving parts drives that treat over-write as a write function. mlc nand flash based ssd’s (the common ssd drives in the market) smallest unit of storage is called a page which is 4kb. 128 pages comprise a block which is the ssd’s smallest erasable unit. this means that even though you are removing a small file, the whole block will not be erased if there are used pages in that block. the traditional way of removing files in oses is just by marking the page as not-in-use in os side, so the drive will not have any idea which pages are in use and which ones are not. these two facts will result in the drive not be able to wipe the blocks that are completely not-in-use. for example when you want to modify a small file on an ssd, the file will be marked not-in-use in os (traditional delete process) and then it will be written on a different block because the drive doesn’t know the current block can be wiped. this process is fine until the drive gets to a point that it goes out of empty blocks and needs to write to the already marked-as-delete pages. now the whole block has to be read into the memory then be erased from the ssd, the new data has to be inserted into the block and the block to be written to the disk again. this extra overhead is what kills the performance of the drives over long term.
trim is a command that lets the drive know which blocks are not in use and ready for garbage collection, this way the erase can be done when you delete a file rather than when you want to write on that block which result in avoiding the extra overhead.
linux started supporting the trim from version 2.6.33 onward, and windows with server 2008 server r2. for a complete list of the supporting oses see the wiki like here.
to add the support on linux you also need ext4 file system, for how to add trim support on linux please see this link.
September 4, 2011 § 1 Comment
recently i wanted to migrate from ext3 to ext4 file system without losing any data on the hard drive, in order to use the new trim functionality that is available on linux 2.6.33 and later. i searched the internet and there were a few links, however they were not complete or they were for different distros. i tried a few of them and ended up with not-bootable linux and lots of issues. finally i found how to do this by trial and error and thought to write a short tutorial on how to do it.
the first thing needs to be done is to enable the extra options on the ext3 file system by running the following command:
tune2fs -O extents,uninit_bg,dir_index [hard drive mount point]
in my case the mount point is /dev/sda1
then you have to run the file system check utility to re-adjust the file system to your new parameters (don’t worry about the errors, they are expected)
fsck -f -y [hard drive mount point]
after the file system parameters are adjusted you need to let the kernel know that you want to run ext4 file system. this is done through the grub boot loader. add the following kernel option to your kernel line in grub’s menu.lst file.
for example, your menu.lst section will be something like,
title Debian GNU/Linux, kernel 3.0.1-rt11
kernel /boot/vmlinuz-3.0.1-rt11 root=/dev/sda1 ro quiet rootfstype=ext4
then you need to edit /etc/fstab file and change the drive fs type to ext4, for example if the original line is
/dev/sda1 / ext3 rw,noatime,errors=remount-ro 0 1
you need to modify it to,
/dev/sda1 / ext4 discard,rw,noatime,errors=remount-ro,commit=0 0 1
discard option is added to use the new trim functionality for ssd drives. i will discuss this in another post.
now you can reboot and your system will boot up using your new ext4 file system. remember this is a must if you are going to use ssd drives on your system.
also note that grub doesn’t read ext4 file systems, you need to upgrade to grub2 for you boot loader to work. the upgrade to grub2 is very easy and harmless. here’s a good link on grub2
December 28, 2010 § Leave a comment
vvvv is a toolbox to simulate and prototype the models and ideas in a very short time, effectively. the tool is very easy to use due to the graphical interface, and drag and drop functionalities. in less than couple of hours from downloading it i designed an audio to visual conversion utility (something like a media players’ visualizations) using fast fourier transform (basically that was why i downloaded it in the first place.) it has a lot of different mathematical/graphical functionalities like a small, portable, easy to use and also free matlab. it also has the capability of running on multiple computers to facilitate the heavier tasks. it also utilizes the direct-x capabilities on windows.
below is snapshots of the visualization.