Page 4 of 16 FirstFirst ... 2345614 ... LastLast
Results 31 to 40 of 152

Thread: Improve (potentially halve) login time by using readahead

  1. #31
    Join Date
    Sep 2007
    Beans
    7

    Re: Improve (potentially halve) login time by using readahead

    Before this how to about 35 secs.
    After the reboot it did about 8 secs after the login screen.

    Really nice ! Thanx...

  2. #32
    Join Date
    Aug 2006
    Beans
    30

    Re: Improve (potentially halve) login time by using readahead

    I mkdir readahead, issue sudo readahead-watch -o readahead/gnome.root, I then login and sudo killall readahead-watch
    but there is never a gnome.root file inside of my readahead directory.... just empty file.

    readahead-watch did spin the disk the first time ran for about 30 seconds, but from then on it runs instantly.

    why is there no gnome.root file?

    EDIT: well, using the full directory (/home/user/readahead/gnome.root) seemed to work. not sure why it didn't before, considering I was in my home dir, used sudo and issued it to readahead/gnome.root
    but whatever
    Last edited by loadeddreams; October 29th, 2007 at 05:54 AM.

  3. #33
    Join Date
    Oct 2004
    Location
    Cupertino, CA
    Beans
    5,092
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Improve (potentially halve) login time by using readahead

    Try using the full path to your home directory. Relative paths might not work (look for /gnome.root to confirm that suspicion)
    Quote Originally Posted by tuxradar
    Linux's audio architecture is more like the layers of the Earth's crust than the network model, with lower levels occasionally erupting on to the surface, causing confusion and distress, and upper layers moving to displace the underlying technology that was originally hidden

  4. #34
    Join Date
    Aug 2006
    Beans
    30

    Re: Improve (potentially halve) login time by using readahead

    yep, you were exactly right. using relative path didn't work, but /gnome.root was empty as well. either way I have it solved now
    thanks for the very quick response, and this is a very great post. It worked wonders, even on my very slim laptop setup.

    The biggest improvement I saw was with my icons. I use a custom icon pkg that was taking a while to load at start, and I could definitely feel an improvement.

  5. #35
    Join Date
    Apr 2005
    Location
    germany
    Beans
    166

    Re: Improve (potentially halve) login time by using readahead

    Aww man... I had the same problem missing the gnome.root, but I decided to work on it today. So I log in this morning only to find using compiz my window borders are lost! I really didn't do anything else yesterday... what the hell?
    EDIT: Ok fixed that... Compiz disabled Window Decoration... what a way to start the day
    Last edited by nickless; October 30th, 2007 at 08:57 AM.

  6. #36
    Join Date
    Mar 2007
    Beans
    202

    Re: Improve (potentially halve) login time by using readahead

    Quote Originally Posted by jdong

    Now, log out, and press CTRL+ALT+F1 to log into a terminal. Start the profiler:

    Code:
    sudo readahead-watch -o ~/.readahead/gnome.root /
    I have a n00bie question. I bet it's painfully obvious but I don't have any experience with this.

    I logged out and pressed CTRL+ALT+F1, but all I got was a black screen and a flashing cursor. I couldn't type anything. I gave it a while, but nothing changed, so I had to power down manually. I restarted, tried again, but the same thing happened.

    What's supposed to happen when I click CTRL+ALT+F1?

    BTW, I'm not pressing the +. Just holding down the CTRL, ALT and F1 buttons together.

  7. #37
    Join Date
    May 2005
    Location
    North Carolina
    Beans
    87
    Distro
    Ubuntu Development Release

    Re: Improve (potentially halve) login time by using readahead

    Looks like you might have this bug - https://bugs.launchpad.net/bugs/129910

  8. #38
    Join Date
    Mar 2007
    Beans
    202

    Re: Improve (potentially halve) login time by using readahead

    Thanks. At least now I know I have a real bug, and I'm not just a n00b.

  9. #39
    Join Date
    Nov 2007
    Beans
    20

    Re: Improve (potentially halve) login time by using readahead

    Hello, thanks for the tip. I modified your 00readahead script to include recording and filtering the list when "profile" is in the kernel command line.

    Code:
    # This script will provide readahead support for an Xsession.
    # Place in /etc/X11/Xsession.d/00readahead
    
    # Added by Pat Double
    
    # Check that the package is still installed
    if [ -x /sbin/readahead-list ] && [ -x /sbin/readahead-watch ]; then
    
    if grep -qs "profile" /proc/cmdline; then
    
    	# Prepare directory
    	[ -d $HOME/.readahead ] || mkdir $HOME/.readahead
    	rm $HOME/.readahead/* 2>/dev/null
    
    	# Start future job that will either wait for user (if zenity or xmessage is available) or 30s to save readahead lists
    	cat >/tmp/${USER}.readahead.sh <<EOF
    #!/bin/sh
    if [ -x /usr/bin/zenity ]; then
    	sleep 5s
    	/usr/bin/zenity --info --text="Your session is being profiled for future speed improvements. Please click OK when your desktop has finished loading."
    elif [ -x /usr/bin/xmessage ]; then
    	sleep 5s
    	/usr/bin/xmessage -center -buttons "Stop" "Your session is being profiled for future speed improvements. Please click Stop when your desktop has finished loading."
    else
    	sleep 30s
    fi
    
    # Stop watching
    killall /sbin/readahead-watch
    while pidof readahead-watch >/dev/null; do sleep 1s; done
    
    # Filter out large or unuseful files
    for F in ${FILES}; do
    	while [ ! -e \${F} ]; do sleep 1s; done
    	TSZ=0
    	while read L; do
    		[ -r "\${L}" ] || continue
    		[ "\${L#/tmp/}" = "\${L}" ] || continue
    		[ "\${L#/var/tmp/}" = "\${L}" ] || continue
    		[ "\${L#/var/cache/}" = "\${L}" ] || continue
    		LSZ=\$(stat "\${L}" --printf "%s")
    		[ \${LSZ} -lt 8000000 ] || continue
    		echo "\${L}"
    		TSZ=\$(( \${TSZ} + \${LSZ} ))
    	done <\${F} >> $HOME/.readahead/\${F#/tmp/${USER}.}
    	rm \${F}
    	logger -i -t "readahead" "Will readahead \${TSZ} bytes for \${F#/tmp/${USER}.}"
    done
    rm \$0
    EOF
    	chmod +x /tmp/${USER}.readahead.sh
    	/tmp/${USER}.readahead.sh &
    
    	# Start watching
    	FILES="/tmp/${USER}.root"
            /sbin/readahead-watch -o /tmp/${USER}.root /
    	if mountpoint -q /home; then
    		FILES="${FILES} /tmp/${USER}.home"
                    /sbin/readahead-watch -o /tmp/${USER}.home /home
    	fi
    
    
    elif [ -d $HOME/.readahead ]; then
    
    	# Do not background readahead-list as several partitions on the same disk may be
    	# referenced and concurrent instances will cause thrashing
    	for list in $HOME/.readahead/*; do
    	  readahead-list $list
    	done
    fi
    
    fi # package existance check
    Last edited by double1116; September 18th, 2008 at 03:00 PM. Reason: Fixed incorrect directory name causing readahead not to work. Move dialog to before starting readahead-watch.

  10. #40
    Join Date
    Oct 2004
    Location
    Cupertino, CA
    Beans
    5,092
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Improve (potentially halve) login time by using readahead

    Wow, very nice man, that's quite a polished solution. Thanks for posting it
    Quote Originally Posted by tuxradar
    Linux's audio architecture is more like the layers of the Earth's crust than the network model, with lower levels occasionally erupting on to the surface, causing confusion and distress, and upper layers moving to displace the underlying technology that was originally hidden

Page 4 of 16 FirstFirst ... 2345614 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •