FedoraForum.org - Fedora Support Forums and Community
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 37
  1. #16
    Join Date
    Nov 2010
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Quote Originally Posted by JONOR
    @ simpleblue; Are you using Fedora, as RupertPupkin's suggestion is code for Fedora ?

    Also when you say :



    is that without entering any mkdir command into the terminal ?
    Yes, I'm using Fedora 14.

    I started entering these commands in terminal:

    Code:
    mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpu
    mkdir -m 0777 /sys/fs/cgroup/cpu/user
    Then when it didn't work I entered in the Ubuntu instructions below:

    mkdir -p /dev/cgroup/cpu
    mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
    mkdir -m 0777 /dev/cgroup/cpu/user
    echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent

    and make it executable:
    sudo chmod +x /etc/rc.local

    And then add the following to your ~/.bashrc file (to open it: gedit ~/.bashrc):

    if [ "$PS1" ] ; then
    mkdir -p -m 0700 /dev/cgroup/cpu/user/$$ > /dev/null 2>&1
    echo $$ > /dev/cgroup/cpu/user/$$/tasks
    echo "1" > /dev/cgroup/cpu/user/$$/notify_on_release
    fi

    Run the following command:
    sudo gedit /usr/local/sbin/cgroup_clean

    And paste this:

    #!/bin/sh
    rmdir /dev/cgroup/cpu/$*

    then save the file and make it executable:
    sudo chmod +x /usr/local/sbin/cgroup_clean

    And finally, restart the computer or manually run the /etc/rc.local file ("sudo /etc/rc.local").

  2. #17
    Join Date
    Aug 2007
    Location
    Cornwall England
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Easy alternative to the new 200 line kernel patch

    For Fedora i suggest ignoring that other/ubuntu code and following RupertPupkin (post 4) and Schurke (post 11) after having made backups.
    Am i right in assuming you have modified code for identifying your OS as there is a penguin on the R.H.S. not a Fedora symbol ?

  3. #18
    Join Date
    Jul 2007
    Location
    ::1
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    @simpleblue -you've got Ubuntu's paths there, try fixing it for Fedora:

    as root
    Code:
    service cgconfig start
    and
    Code:
    chkconfig --level 2345 cgconfig on
    in /etc/rc.local
    Code:
    mkdir -m 0777 /cgroup/cpu/user
    echo "/usr/local/sbin/cgroup_clean" > /cgroup/cpu/release_agent
    then in /usr/local/sbin/cgroup_clean
    Code:
    #!/bin/sh
    rmdir /cgroup/cpu/user/$*
    and make it exec with
    Code:
    chmod +x /usr/local/sbin/cgroup_clean
    in user's ~/.bashrc
    Code:
    if [ "$PS1" ] ; then
    mkdir -m 0700 /cgroup/cpu/user/$$
    echo $$ > /cgroup/cpu/user/$$/tasks
    echo "1" > /cgroup/cpu/user/$$/notify_on_release
    fi
    finally, a
    Code:
    sudo sh /etc/rc.local
    should do...
    Last edited by schurke; 20th November 2010 at 12:14 AM.

  4. #19
    Join Date
    Nov 2010
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    I reentered this information:

    For Fedora i suggest ignoring that other/ubuntu code and following RupertPupkin (post 4) and Schurke (post 11) after having made backups.
    Am i right in assuming you have modified code for identifying your OS as there is a penguin on the R.H.S. not a Fedora symbol ?
    And I have a penguin as my OS because I use Google Chrome dev edition.

    And then I entered...

    Quote Originally Posted by schurke
    @simpleblue -you've got Ubuntu's paths there, try fixing it for Fedora:

    as root
    Code:
    service cgconfig start
    and
    Code:
    chkconfig --level 2345 cgconfig on
    in /etc/rc.local
    Code:
    mkdir -m 0777 /cgroup/cpu/user
    echo "/usr/local/sbin/cgroup_clean" > /cgroup/cpu/release_agent
    then in /usr/local/sbin/cgroup_clean
    Code:
    #!/bin/sh
    rmdir /cgroup/cpu/user/$*
    and make it exec with
    Code:
    chmod +x /usr/local/sbin/cgroup_clean
    in user's ~/.bashrc
    Code:
    if [ "$PS1" ] ; then
    mkdir -m 0700 /cgroup/cpu/user/$$
    echo $$ > /cgroup/cpu/user/$$/tasks
    echo "1" > /cgroup/cpu/user/$$/notify_on_release
    fi
    finally, a
    Code:
    sudo sh /etc/rc.local
    should do...
    Thank you so much for putting all that together. I appreciate it!


    I still do get this message as soon as I open up the terminal:

    Code:
    mkdir: cannot create directory `/sys/fs/cgroup/cpu/user/5313': No such file or directory
    bash: /sys/fs/cgroup/cpu/user/5313/tasks: No such file or directory

    My guess is that I've entered a script into a file and have not yet deleted it. Aside from that, everything seems fine.

  5. #20
    Join Date
    Aug 2007
    Location
    Cornwall England
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Might it be in /etc/rc.d/rc.local ?

    And when you say fine is that the same speed, faster or slower

    Last edited by JONOR; 20th November 2010 at 12:37 AM.

  6. #21
    Join Date
    Nov 2010
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Quote Originally Posted by JONOR
    Might it be in /etc/rc.d/rc.local ?
    I have this in etc/rc.d/rc.local:

    Code:
    #!/bin/sh
    #
    # This script will be executed *after* all the other init scripts.
    # You can put your own initialization stuff in here if you don't
    # want to do the full Sys V style init stuff.
    
    touch /var/lock/subsys/local
    
    mkdir -m 0777 /cgroup/cpu/user
    echo "/usr/local/sbin/cgroup_clean" > /cgroup/cpu/release_agent

    The ~/.bashrc has this:

    Code:
    # .bashrc
    
    # User specific aliases and functions
    
    alias rm='rm -i'
    alias cp='cp -i'
    alias mv='mv -i'
    
    # Source global definitions
    if [ -f /etc/bashrc ]; then
            . /etc/bashrc
    fi
    
    # ANDRE edit... New speed patch by Lennart Poettering
    if [ "$PS1" ] ; then
    mkdir -m 0700 /cgroup/cpu/user/$$
    echo $$ > /cgroup/cpu/user/$$/tasks
    echo "1" > /cgroup/cpu/user/$$/notify_on_release
    fi

    etc/rc.local has this:
    Code:
    #!/bin/sh
    #
    # This script will be executed *after* all the other init scripts.
    # You can put your own initialization stuff in here if you don't
    # want to do the full Sys V style init stuff.
    
    touch /var/lock/subsys/local
    
    mkdir -m 0777 /cgroup/cpu/user
    echo "/usr/local/sbin/cgroup_clean" > /cgroup/cpu/release_agent

    I'm trying to find out where I have entered that script.

  7. #22
    Join Date
    Sep 2009
    Posts
    2,209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Daniel asked:
    Quote Originally Posted by bart3005
    Hi

    Does one need to do any clean up?

    The task folder in /cgroup/cpu/user/ seem to stay after he shell has been closed.

    Regards
    Daniel
    Here's a link to a later post in the kernel patch thread that shows how to implement Lennart's method with clean up.

    Enjoy,
    dd_wizard

  8. #23
    Join Date
    Nov 2010
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Quote Originally Posted by JONOR
    Might it be in /etc/rc.d/rc.local ?

    And when you say fine is that the same speed, faster or slower

    I'm testing it out by running 15 concurrent flash videos on VLC. Not a likely everyday activity.

    Do I just remove the script from ~/.bashrc and etc/rc.d/rc.local to turn it off? I'd like to turn it off while all the vids are up so I can see immediate results if possible.


    And thanks for the cleanup script dd_wizard!

    *** Edit for Results so far ***

    I took out the script for ~/.bashrc and had 21 flash videos running simultaneously in VLC. I did not notice a difference either way. I'm guessing I either didn't shut the scheduler patch off or it wasn't on to begin with. I think it might be best to wait until the kernel comes out unless anyone has any other ideas.
    Last edited by simpleblue; 20th November 2010 at 02:10 AM. Reason: Results

  9. #24
    Join Date
    Nov 2006
    Location
    Detroit
    Posts
    10,336
    Mentioned
    131 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Quote Originally Posted by JONOR
    It might be a bit early to ask but do you notice any significant differences with the change ?
    Yes, when I have lots of apps running everything is noticeably snappier than before.

  10. #25
    Join Date
    Jun 2007
    Location
    Poland
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Could someone post here the numbers after applying this new magic patch?

  11. #26
    Join Date
    Jul 2010
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Well, this feature is pretty much interesting only for kernel hackers
    anyway. It is completely irrelevant for normal desktop people. Because
    a) normal users don't use many terminals anyway and that very seldom and
    b) if they do that they do not create gazillion of processes from one of
    the terminals and only very few in the other. Because only then this
    patch becomes relevant.
    http://marc.info/?l=linux-kernel&m=128993935321081&w=2
    Last edited by skyxn3t; 21st November 2010 at 09:59 PM.

  12. #27
    Join Date
    Jul 2009
    Location
    London,England
    Posts
    1,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Summary
    ========

    Poettering says this is only worthwhile if you compile kernels with make -j64 all the time while doing other desktop work, and in any case it's stupid doing it in the kernel cos he's got an ever so clever method of doing it with userspace scripts.

    Everyone else says, shut up Poettering, you haven't got a clue what people do on their desktops and a small kernel patch is an easy way to give the benefits without relying on userspace methods which are not cross-platform and fiddly.


    I'd apply Poettering's userspace patch for now, and then forget about it. Those who care will be able to apply kernel patch as and when necessary.

  13. #28
    Join Date
    Sep 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Re: Easy alternative to the new 200 line kernel patch

    Hi all,
    Is there a way to check all changes go well?

    "usemoslinux" page says at the end of the instructions:
    "Note: if you see the directory /dev/cgroup/ you are going to note a considerable improvement in the multitasking management".

    Is that true? I can't see that directory... but I guess it applies to ubuntu, and i'm fedora13...

    http://usemoslinux.blogspot.com/2010...lizado-el.html

  14. #29
    Join Date
    Apr 2010
    Location
    uk
    Posts
    726
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Hello
    looks interesting so gave it a try, oops tripped at first hurdle (sort of) trying to start cgconfig I get this
    Code:
    [root@localhost ~]# service cgconfig start
    Starting cgconfig service: Loading configuration file /etc/cgconfig.conf failed
    Cgroup is not mounted
    Failed to parse /etc/cgconfig.conf                         [FAILED]
    any ideas ?
    fedora 14 fluxbox and gnome2 hp compaq nx9030 laptop 2Gb ram, helicopter landing pad, jacuzzi, mini fridge, gateway to alternative dimension

  15. #30
    Join Date
    Jul 2007
    Location
    ::1
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Easy alternative to the new 200 line kernel patch

    Quote Originally Posted by bonedome
    any ideas ?
    yup, something's wrong with your /etc/cgconfig.conf

    check how far is it from something like
    Code:
    mount {
    	cpuset	= /cgroup/cpuset;
    	cpu	= /cgroup/cpu;
    	cpuacct	= /cgroup/cpuacct;
    	memory	= /cgroup/memory;
    	devices	= /cgroup/devices;
    	freezer	= /cgroup/freezer;
    	net_cls	= /cgroup/net_cls;
    	ns	= /cgroup/ns;
    	blkio	= /cgroup/blkio;
    }

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Need to Patch Kernel, but The Patch Requires Kernel Config.
    By AwesomeMachine in forum Using Fedora
    Replies: 4
    Last Post: 13th January 2010, 06:50 PM
  2. Need Help Making a Kernel Patch work with F11 Kernel
    By Jeff91 in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 12th June 2009, 12:51 AM
  3. Line-In Problem (Probably an Easy Solution?)
    By jobeirne in forum Using Fedora
    Replies: 7
    Last Post: 28th April 2006, 01:44 AM
  4. how to patch using command line
    By xyleo in forum Using Fedora
    Replies: 4
    Last Post: 4th April 2006, 06:51 AM
  5. how to patch a kernel
    By thesource in forum Using Fedora
    Replies: 1
    Last Post: 1st July 2005, 04:59 AM

Posting Permissions

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