Jump to content

The Linux desktop is about to get a LOT faster


securitybreach

Recommended Posts

securitybreach

Vagabond sent me a link to this earlier and thought I would post it here.

Linux is already fast, but it’s about to get a whole lot faster thanks to a new patch that’s been developed.The patch, created by Linux kernel developer Mike Galbraith, is 233 lines long and tweaks the kernel scheduler and cutting down latency by a whopping factor of ten.Phoronix has some demo videos showing the improvements the patch offers. Even Linus Torvalds, who is arguably the father of Linux, is impressed:
Yeah. And I have to say that I’m (very happily) surprised by just how small that patch really ends up being, and how it’s not intrusive or ugly either. I’m also very happy with just what it does to interactive performance. Admittedly, my “testcase” is really trivial (reading email in a web-browser, scrolling around a bit, while doing a “make -j64″ on the kernel at the same time), but it’s a test-case that is very relevant for me. And it is a _huge_ improvement. It’s an improvement for things like smooth scrolling around, but what I found more interesting was how it seems to really make web pages load a lot faster. Maybe it shouldn’t have been surprising, but I always associated that with network performance. But there’s clearly enough of a CPU load when loading a new web page that if you have a load average of 50+ at the same time, you _will_ be starved for CPU in the loading process, and probably won’t get all the http requests out quickly enough. So I think this is firmly one of those “real improvement” patches. Good job. Group scheduling goes from “useful for some specific server loads” to “that’s a killer feature”.
When Linus calls this a “real improvement,” and a “killer feature” then it’s probably time for the rest of us to shut up and pay attention to this patch.
http://www.zdnet.com/blog/hardware/the-lin...ot-faster/10372
Link to comment
Share on other sites

Sounds like good news, although I don't have any problems with multimedia, even with several players going at once (except for the jumbled sounds doing my head in!).There's some serious Windows trolling in the comments, and hilarious replies to the trolling. Love this one:

Allow me to head off the linux crazies...@honeymonsterYOU DON'T KNOWS! Filthy tricksy WINBLOW$! PROVES IT! We wants a LINK!AAAARRGH!...my preciousss... *strokes stuffed penguin*ericesque
:thumbsup:
Link to comment
Share on other sites

securitybreach
Sounds like good news, although I don't have any problems with multimedia, even with several players going at once (except for the jumbled sounds doing my head in!).There's some serious Windows trolling in the comments, and hilarious replies to the trolling. Love this one: :thumbsup:
:thumbsup:
Link to comment
Share on other sites

So any idea when this patch will be showing up in the updates?I can't understand why some people truly believe W1d0w$ is faster than Linux. I have both OS's on my rig that I built. AMD Athalon 64 with 2 gigs of memory. (NO SPEED DEMON) by any account. And really doing a side by side comparison, I can honestly say Linux is MUCH faster. Especially in regards to Web browsing. I would say it's about 2:1 in regards to web browsing.Ian

Link to comment
Share on other sites

How about this thenhttp://www.webupd8.org/2010/11/alternative...rnel-patch.html"Phoronix recently published an article regarding a ~200 lines Linux Kernel patch that improves responsiveness under system strain. Well, Lennart Poettering, a RedHat developer replied to Linus Torvalds on a maling list with an alternative to this patch that does the same thing yet all you have to do is run 2 commands and paste 4 lines in your ~/.bashrc file. I know it sounds unbelievable, but apparently someone even ran some tests which prove that Lennart's solution works. Read on!Basically, Lennart explains you have to add this to your ~/.bashrc file (important: this won't work on Ubuntu. See instructions for Ubuntu further down the post!):"I'm struggling to implement the instructions in Mandriva. ie: I can not figure out how to find the " ~/.bashrc file " spent two hours looking on the net and I'm no wiser :thumbsup:

Link to comment
Share on other sites

abarbarian, I found that the ~/.bashrc file is in your home directory. If your username on your computer was "joe" it would be in ('/home/joe') The .bashrc is a hidden file and is just called .bashrc. You can edit your own .bashrc as a normal user. So maybe once you CD to your "joe" folder you could

$ ls -a
to show all the hidden files with-in that folder? As everyone knows I am new, but this info is fresh in my head because I have been reading for hours for the last couple of weeks. :)So my question is, once you find the .bashrc file, you have to edit it with vi or Emacs with?
if  [ "$PS1" ] ; thenmkdir -m 0700 /sys/fs/cgroup/cpu/user/$$echo $$ > /sys/fs/cgroup/cpu/user/$$/tasksfi

Then in Konsole as root?

mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpumkdir -m 0777 /sys/fs/cgroup/cpu/user

Editing because I can't spell today nor can I use proper grammar. :thumbsup:

Edited by ichase
Link to comment
Share on other sites

securitybreach

Well you can use any editor you would like to make the changes. Since you run kde, you could easily just:

kedit ~/.bashrc

then add the info.

Link to comment
Share on other sites

Well you can use any editor you would like to make the changes. Since you run kde, you could easily just:
kedit ~/.bashrc

then add the info.

Well that is certainly A LOT easier. But would you have to tell the konsole where the ~/.bashrc file is, or would it automatically know where it is and allow you to edit simply by typing
kedit ~/.bashrc

Link to comment
Share on other sites

securitybreach

Well the ~/ is just a shortcut for /home/user or whatever user you are logged in as. So using kedit ~/.bashrc would launch kedit and open /home/user/.bashrc.

Link to comment
Share on other sites

Well the ~/ is just a shortcut for /home/user or whatever user you are logged in as. So using kdeit ~/.bashrc would launch kedit and open /home/user/.bashrc.
My brain seems refreshed today, because this stuff is making a lot more sense. :thumbsup:
Link to comment
Share on other sites

I have looked through the tutorials as well as the BASH commands index. Now, I being of sound mind and being of some decent inteligence, before I edit a darn thing in the .bashrc file, I want to save that file as a different name such as .bashrc1 Just in case for some reason I screw something up, I can revert back to that file and have my original .bashrc file back the way it was.How do you copy and "save as" a file in the same directory. I know the CP command copies files from one directory to another but can I use that to "save as" and rename a file in the same directory? I know the answer is "YES" but how do you do it. :)As always, thank you so very much for your patience with me. :thumbsup:

Link to comment
Share on other sites

securitybreach
I have looked through the tutorials as well as the BASH commands index. Now, I being of sound mind and being of some decent inteligence, before I edit a darn thing in the .bashrc file, I want to save that file as a different name such as .bashrc1 Just in case for some reason I screw something up, I can revert back to that file and have my original .bashrc file back the way it was.How do you copy and "save as" a file in the same directory. I know the CP command copies files from one directory to another but can I use that to "save as" and rename a file in the same directory? I know the answer is "YES" but how do you do it. :)As always, thank you so very much for your patience with me. :thumbsup:
 cp ~/.bashrc ~/.bashrc-bk

If you just wanted to rename it, you could just use the mv command:

mv ~/.bashrc ~/.bashrc-bk

Link to comment
Share on other sites

 cp ~/.bashrc ~/.bashrc-bk

If you just wanted to rename it, you could just use the mv command:

mv ~/.bashrc ~/.bashrc-bk

Is the -bk just showing that it is a backup of the original file?
Link to comment
Share on other sites

the ~/ is just a shortcut for /home/user
Thanks, Josh. If I ever knew this, it was immediately forgotten. One more piece of the file system fit into place. Maybe if I stick with it in 10 or 15 years, I'll understand it. :thumbsup:
Link to comment
Share on other sites

securitybreach
Is the -bk just showing that it is a backup of the original file?
Yes and no, .bashrc.bk is the name of the actual backed up file. Otherwise the new one would overwrite the old one. Of course you could call it .bashrc1 like you mentioned above. :thumbsup:
Link to comment
Share on other sites

Yes and no, .bashrc.bk is the name of the actual backed up file. Otherwise the new one would overwrite the old one. Of course you could call it .bashrc1 like you mentioned above. :hysterical:
You are right Josh! One could name the new file whichever way one wants. Maybe this is why Bruno used to make us do it this way;
mv /home/rejean/.kde /home/rejean/.kde -old

so that we would know which one was the original.and I too like Liz had forgotten that;

the ~/ is just a shortcut for /home/user
. Thanks for the reminder Josh. Edited by réjean
Link to comment
Share on other sites

Attempted the alternative code addition to the .bashrc file. After adding the code and going into Konsole and pasting in the code, I got the following:

[ichase@localhost ~]$ suPassword:[root@localhost ichase]# mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpumount: mount point /sys/fs/cgroup/cpu does not exist[root@localhost ichase]# mkdir -m 0777 /sys/fs/cgroup/cpu/usermkdir: cannot create directory `/sys/fs/cgroup/cpu/user': No such file or directory[root@localhost ichase]#

So that did not work out as planned???Needless to say, I put my .bashrc file back to the way it was originally. :hysterical:

Edited by ichase
Link to comment
Share on other sites

mkdir: cannot create directory `/sys/fs/cgroup/cpu/user': No such file or directory[root@localhost ichase]#[/code]So that did not work out as planned???Needless to say, I put my .bashrc file back to the way it was originally. :hysterical:
As long as you are running as root, you should be able to create it. If the directories eg. /cgroup, /cpu and /user don't exist, you may have to create those first. Assuming /sys/fs/ exists:
mkdir /sys/fs/cgroup && mkdir /sys/fs/cgroup/cpu && mkdir /sys/fs/cgroup/cpu/user

Link to comment
Share on other sites

Attempted the alternative code addition to the .bashrc file. <snip>
I attempted it as well in slackware 13.1.Did not quite work.However, could anyone clarify a few things?I appear to be missing a few steps.Looking for answers for why it did not work...I noticed that cgroup is not listed in:
cat /etc/filesystems
It should...shouldn't it?
cat /boot/config | grep -i cgroupCONFIG_CGROUPS is not set
So I'm assuming I would need to rebuild the kernel with the option set...correct?And I also came across a mention of installing libcgroup.Do I need this? I'm not finding it in the list of packages for slackware.I'm not finding it at slackbuilds.I did locate the source and was able to configure it using:
./configure --disable-pam

And make and make install ran without any glaring errors.Does all this sound about right?Thanks in advance...

Link to comment
Share on other sites

Sunrat,Well, I am thinking I have a bigger problem going on here.I attempted what you suggested:

mkdir /sys/fs/cgroup && mkdir /sys/fs/cgroup/cpu && mkdir /sys/fs/cgroup/cpu/user

This is what I got. I'm like you, no reason why I should not be able to make a directory in Root?

[ichase@localhost ~]$ suPassword:[root@localhost ichase]# mkdir /sys/fs/cgroup && mkdir /sys/fs/cgroup/cpu && mkdir /sys/fs/cgroup/cpu/usermkdir: cannot create directory `/sys/fs/cgroup': No such file or directory[root@localhost ichase]#

:hysterical:

Link to comment
Share on other sites

:oops: Well I ran ,kwrite ~/.bashrc and altered the file.Tried lots of ways to do,mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpumkdir -m 0777 /sys/fs/cgroup/cpu/usergot the same output as ichase, tried sunrat's,mkdir /sys/fs/cgroup && mkdir /sys/fs/cgroup/cpu && mkdir /sys/fs/cgroup/cpu/userno joy there either.Tried to alter me ~/.bashrc as i forgot to make a backup and got this,[********@localhost ~]$ cd ~/.bashrcbash: cd: /home/^^^^^^^^/.bashrc: Not a directory[^^^^^^^^^@localhost ~]$ su Password: [root@localhost ^^^^^^^^^]# cd ~/.bashrc bash: cd: /root/.bashrc: Not a directory [root@localhost ^^^^^^^^^]# cd #/.bashrc [root@localhost ~]# ls drakx/ oldflashplugins.tar.gz tmp/ [root@localhost ~]# kwrite ~/.bashrckdeinit4: preparing to launch /usr/lib64/libkdeinit4_klauncher.sokdeinit4: Communication error with launcher. Exiting!KCrash: Application 'kwrite' crashing...sock_file=/root/.kde4/socket-localhost.localdomain/kdeinit4__0Warning: connect() failed: : Connection refusedKCrash cannot reach kdeinit, launching directly.[1]+ Stopped kwrite ~/.bashrc[root@localhost ~]# QPainter::end: Painter ended with 2 saved stateskdeinit4: preparing to launch /usr/lib64/libkdeinit4_klauncher.sokdeinit4: Communication error with launcher. Exiting! :hysterical: So will me pc start tomorrow :) I did notice that there is an empty folder called "cgroup" in the "root" folder which might be a clue to getting this to work in Mandriva. :fish:
Link to comment
Share on other sites

abarbarian, I see where you are trying to CD to .bashrc which you will not be able to do being that .bashrc is not a directory but a single file. When I go to Root, I have a folder sys, inside that folder is fs then cgroup is not in there. So in root, I typed cd /sys, it went into the sys folder, I then cd /fs and it went into the fs folder then I typed mk /cgroup and acted like it created it, but when I look in the fs folder (in dolphin) it's not there??? I was going to try to manually create each folder but I'm stuck at the cgroup folder. You are right, there is a cgroup folder which is empty in root???It looks as if Kwrite crashed on you which it did to me as well 1 time. I was able to go back in and change my .bashrc back to it's original state.I think we are definitely doing something wrong, but I know the experts will show is the er of our ways. :hysterical:

Edited by ichase
Link to comment
Share on other sites

abarbarian, I see where you are trying to CD to .bashrc which you will not be able to do being that .bashrc is not a directory but a single file. When I go to Root, I have a folder sys, inside that folder is fs then cgroup is not in there. So in root, I typed cd /sys, it went into the sys folder, I then cd /fs and it went into the fs folder then I typed mk /cgroup and acted like it created it, but when I look in the fs folder (in dolphin) it's not there??? I was going to try to manually create each folder but I'm stuck at the cgroup folder. You are right, there is a cgroup folder which is empty in root???It looks as if Kwrite crashed on you which it did to me as well 1 time. I was able to go back in and change my .bashrc back to it's original state.I think we are definitely doing something wrong, but I know the experts will show is the er of our ways. :hysterical:
A single file, hmmmmmmmmm now thats interesting. You learn something every day :) Tried manually making the relevant folders everywhich way and no joy same as you. "You are right, there is a cgroup folder which is empty in root???"I think the above is the key in Mandriva. :fish:
Link to comment
Share on other sites

abarbarian, I see where you are trying to CD to .bashrc which you will not be able to do being that .bashrc is not a directory but a single file. When I go to Root, I have a folder sys, inside that folder is fs then cgroup is not in there. So in root, I typed cd /sys, it went into the sys folder, I then cd /fs and it went into the fs folder then I typed mk /cgroup and acted like it created it, but when I look in the fs folder (in dolphin) it's not there??? I was going to try to manually create each folder but I'm stuck at the cgroup folder. You are right, there is a cgroup folder which is empty in root???It looks as if Kwrite crashed on you which it did to me as well 1 time. I was able to go back in and change my .bashrc back to it's original state.I think we are definitely doing something wrong, but I know the experts will show is the er of our ways. :hysterical:
I had the same problems trying to create the folders in slackware.And wouldn't the "mk /cgroup" command create the cgroup folder in root? Edited by alphaomega
Link to comment
Share on other sites

I had the same problems trying to create the folders in slackware.And wouldn't the "mk /cgroup" command create the cgroup folder in root?
Well if I changed directories to fs, then typed mk /cgroup should'nt it create the folder in the folder I am currently in? I'm thinking like an old DOS guy and that may be my biggest problem. :hysterical:
Link to comment
Share on other sites

Well if I changed directories to fs, then typed mk /cgroup should'nt it create the folder in the folder I am currently in? I'm thinking like an old DOS guy and that may be my biggest problem. :hysterical:
The way I understand it...mk /cgroup would create a folder named cgroup in root (the / means to start at root).mk cgroup would create a folder named cgroup in the current dirctory.
Link to comment
Share on other sites

The way I understand it...mk /cgroup would create a folder named cgroup in root (the / means to start at root).mk cgroup would create a folder named cgroup in the current dirctory.
Your absolutely correct. I think I have just done so much reading today that my brain is fried. :) I'm the guy that is picking up the guitar for the first time and wants to play Hendrix on day one. Need to realize IT'S NOT GOING TO HAPPEN!!!!! :hysterical:
Link to comment
Share on other sites

Well I manually created sys/fs/cgroup/cpu/user then tried all this again. Still no worky!!! :hysterical: I give up. I have to be on the road in 4 hours. Need to take a nap. :) Have a great weekend all. Will be back around Monday. Look forward to reading all of the replies. Peace,Ian

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...