Tag Archives: Fedora

Fedora 29 and nostalgia

Fedora 29 has released, It had been since the Fedora-Core 2 days that I had used Fedora (rather it was my first foray in linux). We used to wait for computer magazines to deliver free OS CDs. Back then it was a Windows + Fedora. Everytime I had an issue with Fedora I had to switch back to Windows, see what is right / wrong how to go about it and fix it. We didn’t have the comfort of using Smart phones and tablets back then around 2004. Setting up eth0 was still an effort for a newbie like me.

As years moved, Fedora improved and its ability to replace my desktop’s default OS. However still we had to tweak around to make it comfortable. Codecs, font rendering, etc. However it has been one of the most comfortable environments for developers, most of the things available as rpm packages.

Maxing out only till 60%

With Fedora 29, a whole lot has improved, first and foremost, which is on everyone’s mind is GNOME 3.30. This is by far one of the most important GNOME 3x releases. WHY? Install it and you’ll see the amount of RAM that it hogs is way lesser than the earlier versions. Now my 9 yrs old laptop can effectively run GNOME, the modern RAM eating browsers and still leave me room. The new GNOME is lovely and modern yet for the nostalgia the Bluecurve theme deserves a special mention. For years as long GTK2 / GNOME2 ran on my PC, it was the de-facto choice.

The font rendering too has improved off-the-box, Now there is no need to install the freetype-freeworld package, make changes to the ~/.fonts/fonts.conf or .Xresources. I’m not sure what has really changed, whether the patent expiry has come through and we get it as-is without the patent issues.

Hope this Fedora legacy carries on for long. And finally kudos to Redhat, Fedora Team,GNOME and endless other teams for putting in effort for us to consume this beautiful lovely OS which is free!

Fedora magazine has a lovely article that has triggered these memories.

Fedora goes to sleep on USB insert

Did you enable the commands suggested by powertop ?

Thats exactly what happened to me, for days I was wondering why my Fedora 20 x64 was acting weirdly on USB inserts. When I checked journalctl -f,  I found that my system went to sleep !


Jan 29 08:45:27 ruturaj-vartak ntfs-3g[6076]: Version 2013.1.13 integrated FUSE 27
Jan 29 08:45:27 ruturaj-vartak ntfs-3g[6076]: Mounted /dev/sdb1 (Read-Write, label "", NTFS 3.1)
Jan 29 08:45:27 ruturaj-vartak ntfs-3g[6076]: Cmdline options: rw,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177,uhelper=udisks2
Jan 29 08:45:27 ruturaj-vartak ntfs-3g[6076]: Mount options: rw,nodev,nosuid,uhelper=udisks2,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb1,blkdev,blksize=4096
Jan 29 08:45:27 ruturaj-vartak ntfs-3g[6076]: Global ownership and permissions enforced, configuration type 1
Jan 29 08:45:28 ruturaj-vartak kernel: hda-codec: out of range cmd 0:20:400:fffffbff
Jan 29 08:45:28 ruturaj-vartak systemd-logind[434]: Delay lock is active but inhibitor timeout is reached.
Jan 29 08:45:28 ruturaj-vartak systemd[1]: Starting Sleep.
Jan 29 08:45:28 ruturaj-vartak systemd[1]: Reached target Sleep.
Jan 29 08:45:28 ruturaj-vartak systemd[1]: Starting Suspend...
Jan 29 08:45:28 ruturaj-vartak systemd-sleep[6085]: Suspending system...
Jan 29 08:45:40 ruturaj-vartak PackageKit[2929]: daemon quit
Jan 29 08:46:04 ruturaj-vartak kernel: PM: Syncing filesystems ... done.
Jan 29 08:46:04 ruturaj-vartak kernel: PM: Preparing system for mem sleep
Jan 29 08:46:04 ruturaj-vartak kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
Jan 29 08:46:04 ruturaj-vartak kernel: Freezing remaining freezable tasks ...
Jan 29 08:46:04 ruturaj-vartak kernel: Freezing of tasks failed after 20.002 seconds (0 tasks refusing to freeze, wq_busy=1):
Jan 29 08:46:04 ruturaj-vartak kernel: Jan 29 08:46:04 ruturaj-vartak kernel: Restarting kernel threads ... done.

I disabled my powertop suggestions which looked like this

echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';
echo 'min_power' > '/sys/class/scsi_host/host0/link_power_management_policy';
echo 'min_power' > '/sys/class/scsi_host/host1/link_power_management_policy';
echo 'min_power' > '/sys/class/scsi_host/host2/link_power_management_policy';
echo 'min_power' > '/sys/class/scsi_host/host3/link_power_management_policy';
echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';
echo '0' > '/proc/sys/kernel/nmi_watchdog';
echo 'auto' > '/sys/bus/usb/devices/4-1/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:05:00.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.6/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.1/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.7/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.1/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:02.1/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:02.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:04:00.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1b.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.2/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1e.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.7/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.3/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.1/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.2/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.4/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.2/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.3/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:07:00.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:07:00.2/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:07:00.3/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:07:00.4/power/control';

… and voila !! Things started working like normal with USB sticks. I’ve no clue what each of these settings really do.

Tweaking Gnome3 / Fedora fonts like Ubuntu

Recently I installed Fedora 17. Font rendering in Fedora is somewhat unoptimized, thanks to many patent clad algorithms for rendering fonts. But you if you want the best, follow the steps below

  1. Enable RPM Fusion Repos
    rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

  2. Install freetype-freeworld package
    yum install freetype-freeworld

  3. Install gnome tweak tool
    yum install gnome-tweak-tool

  4. Tweak font rendering
    Open gnome-tweak-tool by typing “advanced settings”. Then set
    Hinting = Slight
    Antialiasing = Rgba

  5. Configure ~/.fonts.conf
    Please save the attached file as .fonts.conf in your home folder ( ie. /home/michael/.fonts.conf ). Note the file name is .fonts.conf with a period in the begining.
    fonts

Above will render fonts in the best possible way (Font Rendering is matter of preference – tweak around for yourself). Now any application, Google Chrome, Firefox, etc will render fonts in the same manner.

Fedora (post EOL) Repositories for latest packages

If you’re a Fedora fan, and curse its downside as opposed to Ubuntu where you can add Official PPAs. Here is what I’ve found.

Remi an official Fedora projects contributor does help older distros to work with latest packages by publishing the new ones. The site supports last 2 EOL Fedora releases.

Installation

Install Repo

Install the correct release, as for my Fedora-14, I installed remi-release-14.rpm

$ sudo rpm -ivh http://rpms.famillecollet.com/remi-release-14.rpm

Enable Repo

For some reason, the repository is disabled, Enable it by opening the file in VIM

[remi]
name=Les RPM de remi pour Fedora $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/fedora/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/fedora/$releasever/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
failovermethod=priority

I got Firefox 10x , Thunderbird 10x installed on my Fedora 14 (Laughlin) !

Freeing up RAM (memory) in Linux

Very often I used to find that my Linux box(s), Fedora & Ubuntu both started reserving more RAM over a period of time since its boot. And the actual RAM left free was less.

I knew it was holding some caches for itself so that it could find the programs loading “quickly” and something like that (Sorry for my newbie language).

The most common way to free up RAM is Rebooting! But I wanted to avoid it, so did a little “googling” and I came up with an interesting solution – Tell linux to flush all the caches.

# Flush file system buffers by executing
sync;

# free page cache
echo 1 > /proc/sys/vm/drop_caches;

# free dentries and inodes
echo 2 > /proc/sys/vm/drop_caches

# free page cache, dentries and inodes
echo 3 > /proc/sys/vm/drop_caches

I’ve created a simple bash script, which u can download.

References

  1. http://www.linuxarticles.org/2010/10/release-memory-in-linux-unused-or-cached/
  2. http://www.hdfgroup.org/HDF5/faq/linux-mem.html

KDE 4.4

Just yesterday had an update on Fedora 11 for KDE 4.4. I expected from KDE 4.x legacy that the overall product would be a bit tacky. But opposed to my original thoughts it turned out to be an extremely well polished ‘Desktop’.

The settings were very easy to navigate, with lots of Compiz settings available easily without a lot of ‘extra’ installations as in GNOME. The overall stability of the desktop too was strong. I’m considering to run KDE 4.4 for atleast a week as suggested by one of my sysadmin friends.

This edition reminds me of the good old stable days of KDE 3.x

Redis, Memcached, Tokyo Tyrant and MySQL comparision

I wanted to compare the following DBs, NoSQLs and caching solutions for speed and connections. Tested the following

My test had the following criteria

  • 2 client boxes
  • All clients connecting to the server using Python
  • Used Python’s threads to create concurrency
  • Each thread made 10,000 open-close connections to the server
  • The server was
    • Intel(R) Pentium(R) D CPU 3.00GHz
    • Fedora 10 32bit
    • Intel(R) Pentium(R) D CPU 3.00GHz
    • 2.6.27.38-170.2.113.fc10.i686 #1 SMP
    • 1GB RAM
  • Used a md5 as key and a value that was saved
  • Created an index on the key column of the table
  • Each server had SET and GET requests as a different test at same concurrency

Results please !

Work sheet

throughput set

throughput get

I wanted to simulate a situation where I had 2 servers (clients) serving my code, which connected to the 1 server (memcached, redis, or whatever). Another thing to note was that I used Python as the client in all the tests, definately the tests would give a different output had I used PHP. Again the test was done to check how well the clients could make and break the connections to the server, and I wanted the overall throughput after making and breaking the connections. I did not monitor the response times. I didnt change absolutely any parameters for the servers, eg didn’t change the innodb_buffer_pool_size or key_buffer_size.

MySQL

MySQL lacked the whole scene terribly, I monitored the MySQL server via the MySQL Administrator and found that hardly there were any conncurrent inserts or selects, I could see the unauthenticated users, which meant that the client had connected to MySQL and was doing a handshake using MySQL authentication (using username and password). As you could see I didn’t even perform the 40 and 60 thread tests.

I truncated the table before I swtiched my tests from MyISAM to InnoDB. And always started the tests from lesser threads. My table was as follows

CREATE TABLE `comp_dump` (
  `k` char(32) DEFAULT NULL,
  `v` char(32) DEFAULT NULL,
  KEY `ix_k` (`k`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

NoSQL

For Tokyo Tyrant I used a file.tch as the DB, which is a hash database. I also tried MongoDB as u may find if u have opened the worksheet, But the server kept failing or actually the mongod failed after coming at an unhandled Exception. I found something similar over here. I tried 1.0.1, 1.1.3 and the available Nightly build, but all failed and I lost my patience.

Now what

If you need speed just to fetch a data for a given combination or key, Redis is a solution that you need to look at. MySQL can no way compare to Redis and Memcache. If you find Memcache good enough, you may want to look at Tokyo Tyrant as it does a synchronous writes. But you need to check for your application which server/combination suits you the best. In Marathi there is a saying “मेल्या शिवाय स्वर्ग दिसत नाही”, which means “You can’t see heaven without dieing” or need to do your hard work, can’t escape that 😉

I’ve attached the source code used to test, if anybody has any doubts, questions feel free to ask