JDS/ Gnome Performance - leaner meaner login - thanks Lorenzo

Well - as you know there's been plenty of interest in login times on JDS Solaris. So wanted to give people a little taster for the brave and foolish if they wish strip up to 20% off Gdm login and just can't wait for a 2.14 based release of Gnome ;) \* gconf and login \* With "Lorenzo Coletti's work":http://www.gnome.org/~lcolitti/gnome-startup/analysis/ in the Gnome community, gconf was identified as a real hog on startup. Reading zillions of little config files in deeply nested directories, not good. He managed to shave quite a chunk off startup time by changing its behaviour to read a single merged settings file incrementally, which was also reduced in size by stripping non default language keys. These changes will be supported in future releases of Gnome, but for now if you'd like to experiment I will explain how below. Note this will work with vanilla Solaris Express builds (nevada), but as I'd need to give you a patched gconf to get the incremental reads that wrinkle can wait for another day. Enjoy, as always your mileage may vary, but I've tested this with no ill effects on a Ferrari 3400 nevada b22, my login went from 25 sec down to 20 sec. Laca has managed to reduce his further to 17-18 sec by using a Gnome stack optimised for lazy loading, which will make it into subsequent nevada builds. Still plenty to do, dare I mention Cold Boot to Gdm [100 sec agggghhh]. Compare to Windows 20 sec cold boot to login, and 3 sec from login to desktop, but Rome wasn't built in a day :) Nor will I give my fellow travellers on the road nightmares by mentioning Mac OSX resume from sleep in 2 sec ;) JR \* Steps: \* 1. Create a merged gconf settings defaults file. 2. Strip all the language keys out of the file except the default "C" locale. 3. Put the merged stripped file in the appropriate location and reboot [then cross your fingers and take out your stop watch ;) ]. Any problems, just go into failsafe mode from Gdm and delete the merged file to reset things. If you change any default settings within JDS, you will need to run through the steps above again to regenerate the new default settings. \* 1. Merged Gconf File \* As root: $ gconf-merge-tree /etc/gconf/gconf.xml.defaults/ Generates: /etc/gconf/gconf.xml.defaults/%gconf-tree.xml Copy this file to ~/gconf-tree.xml [Had to do this as every time I tried to use the %gconf-tree.xml on the bash line with the java command below it entered command mode, no matter what I did - if you tell me how to prevent this happening great] \* 2. Strip the langauge strings \* Run: $ cd ~ $ cp /etc/gconf/gconf.xml.defaults/%gconf-tree.xml gconf-tree.xml $ java -Xmx100m -jar gconf-strip-langs.jar gconf-tree.xml > gconf-tree-stripped.xml \* 3. Put the defaults file in place \* $ cp ~/gconf-tree-stripped.xml /etc/gconf/gconf.xml.defaults/%gconf-tree.xml \* What is the gconf-strip-langs.jar doing: \* It's a simple java program I wrote last night in NetBeans to load up the gconf xml file, trundle through its DOM, stripping all local_schema elements [along with children] whose locale attribute is not equal to "C" and then spitting this modified XML out to stdout. If you want to preserve another locale other than the default "C" locale, just hack the attached java file. Example local_schema node, with short description attribute and long description child node: Empty notes are always deleted without confirmation Sizes before and after stripping: 22478144 Oct 19 20:13 gconf-tree.xml 4100783 Oct 19 20:13 gconf-tree-stripped.xml \* gconf-strip-langs \* "Source: Main.java":http://blogs.sun.com/roller/resources/jmr/Main.java "gconf-strip-langs.jar":http://blogs.sun.com/roller/resources/jmr/gconf-strip-langs.jar
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

jmr

Search

Top Tags
Categories
Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today