Browsing Automounted NFS with Nautilus

Has browsing automounted NFS shares with nautilus got you pulling out hair in frustration?

Ever since we transitioned from the RHEL4 environment to Fedora 14, people have been reporting terrible slowness and delays in nautilus when browsing our NFS shares. Reports of waiting over a minute for an NFS automount root-level directory with < 100 sub directories to display the contents are not good.

This wasn’t a problem on our old RHEL4 terminal server and I couldn’t for the life of me understand how nautilus could have become so slow in the years since RHEL4 was released. It just didn’t make sense. I started to think something had to be wrong and that this wasn’t just the new normal expected behaviour but I had nothing to go on.

I tried the basic recommendations: Disable thumbnails, disable preview, disable directory item counts. That didn’t help the user experience in any dramatic way. At this point, I started recommended pcmanfm and thunar as a way to workaround nautilus’ terrible performance. I even wrote a fairly concise script for modifying the default file manager and desktop-drawing application so that using a different file manager wouldn’t be so foreign in GNOME.

Then one day I started looking at the verbose level output from automount while browsing the NFS mounts with nautilus and found a substantial amount of this in the logs:

Apr 28 11:19:10 hostname automount[18959]: attempting to mount entry /home/.svn
Apr 28 11:19:10 hostname automount[18959]: key ".svn" not found in map source(s).
Apr 28 11:19:10 hostname automount[18959]: failed to mount /home/.svn

Oh my! Why are there repeated access attempts for “.svn”? What is causing automount to perform map lookups for “.svn” in the automount-controlled directories? Could it be nautilus?

Why yes!

As it turns out the GNOME SVN integration package “gnubversion” includes a nautilus extension and this extension was causing Nautilus to look for “.svn” directories everywhere and it just so happens that looking for “.svn” in a root-level automount directory causes slow map lookup failures that (presumably) kill the perceptible performance of browsing automounted NFS shares.

I removed gnubversion (as no one was using it) and the user experience for nautilus has normalized. While nautilus still isn’t as speedy as pcmanfm or thunar, its no longer a cause of forceful hair removal incidents… and all is well in the world.

I’m in z-push Limbo

Sparked by the purchase of a new phone with Internet connectivity and native support for push email (ableit with ActiveSync), I decided to see what I could do about pushifying the IMAP server at work.

We run Dovecot 1.1 with a MySQL backend and Postfix for MTA duties. Everything requires both TLS and SSL for authentication and everything requires authentication except for sending mail from the local subnet. It works pretty well. I never touch the thing anymore, it just runs. However, it doesn’t support push email and it certainly doesn’t support ActiveSync. So I went looking for something that could do push email to my spankin’ new phone.

I was surprisingly happy to discover z-push, an open source, standalone ActiveSync implementation in PHP. Well hot damn!

I initially installed the latest stable release, but then quickly tried the SVN trunk for any potential fixes that have yet to make it out to the stable release because I wasn’t having much success. After a few simple problems got resolved and I was updated to the SVN trunk things started to work… kind of. The initial sync takes forever! I didn’t have the patience to wait for all my mail to download because it appeared to be taking several minutes per email. The folder list loaded right up and my nearly empty inbox too but any folder with more than a few messages was taking forever to sync. Not to mention the apache server started to churn CPU pretty hard on the server. Also, it seemed the sync would only even start to work if I had “No Limit” selected on the iPhone for history of emails to sync. Maybe the large volume initial sync by using “No Limit” is just too taxing and that’s why it’s brutally slow but I kept getting “Cannot Get Mail – The connection to the server failed.” on my iPhone if I selected any option besides “No Limit”.

On top of that, push didn’t work!

I’ll keep plugging away at it next week, maybe post on the z-push forums to see if I can get this figured out. Cheers for now.

wxPython is Kicking my Ass!

Let me preface by saying that I’m not a programmer nor software developer nor anything of the sorts. I’m a sysadmin with scripting skills to solve automation problems, for the most part. I took all the C++ classes in High School but I never pursued software development as a serious academic interest or career. I know “about” software development and it’s practices but I don’t feel that I have any particularly interesting skills in the field.

Now that I want to write a site-specific GUI-based LDAP management tool as referenced in a previous post, I’m jumping back into software development a little bit. I’ve decided to use wxPython for a few reasons. We already use it within our group, we have in-house expertise in the form of an actual developer and the GUI-builder tools seem to work best with wxPython (wxGlade was producing bad wxPerl code, go figure).

Let me also say that I’ve never been a big python guy. I’m really a perl kind of dude, so this learning a new object oriented API while learning python at the same time is a challenge… but I’m making progress! Basically, wxPython seriously kicked my ass for about 3 days but now I’m gaining speed and things are moving faster than I expected. Python and wxPython are starting to make more sense and behave.

So far I have a frame with menubar, statusbar and a three-tabbed notebook with a grid on each tab of the notebook. The program is able to connect to an LDAP server (with TLS) and query the directory for all the users, groups and autofs information and then display that information in the grid… and that’s about it so far. I need to build in new user, group and autofs functionality as well as basic editing of existing entries (in place editing with wx.Grid looks really nice but I haven’t tried it yet!).

Although my ass has been kicked for the last few days, I’m actually feeling pretty optimistic about it now.

Hopefully I can share the kludge code at some point, though it will never be easily transportable to different environments since I’m not building this to be the end-all-be-all LDAP user/group/autofs management tool, just one tailored for our environment.