Live data from Hacker News

The ~200 Line Linux Kernel Patch That Does Wonders

phoronix.com

11–20 of 98 posts

Re: The ~200 Line Linux Kernel Patch That Does Wonders

#12

It's not down for me... but here's the text: In recent weeks and months there has been quite a bit of work towards improving the responsiveness of the Linux desktop with some very significant milestones building up recently and new patches continuing to come. This work is greatly improving the experience of the Linux desktop when the computer is withstanding a great deal of CPU load and memory strain. Fortunately, th…

OT: is "make -j64" overkill unless you have dozens of cores or am I missing something?

make -j$(2N + 1) is roughly where minimal compile times are.

Re: The ~200 Line Linux Kernel Patch That Does Wonders

#13
post #11

i whish something similar could be ported to BSD/Darwin, OSX. I have a MBP 6,2 (i5) with 4GB mem/5400 rpm disk and it's quite easy to hog it down, to almost unbearable sometimes.

What sort of tasks?

FWIW, I had a similar configuration to yours (just an older MBP) and installing an SSD helped immensely. I can hit 200% CPU load and not even realize it until the fans kick in…

Re: The ~200 Line Linux Kernel Patch That Does Wonders

#14
post #5

It's not down for me... but here's the text: In recent weeks and months there has been quite a bit of work towards improving the responsiveness of the Linux desktop with some very significant milestones building up recently and new patches continuing to come. This work is greatly improving the experience of the Linux desktop when the computer is withstanding a great deal of CPU load and memory strain. Fortunately, th…

The actual RFC/patch: http://marc.info/?l=linux-kernel&m=128978361700898&w...

Some good stuff in this thread. I found this post by Mike Galbraith (patch author) explaining why it's needed especially interesting:

http://marc.info/?l=linux-kernel&m=128991621119292&w...

Re: The ~200 Line Linux Kernel Patch That Does Wonders

#15
post #7

I am newbie when it comes to compiling kernel. Is it a pain to do with stock ubuntu 10.10? Sometimes I run something heavy on my laptop and desktop freezes annoy me. If this patch will allow me to get around it - I would be glad to try it out. Anyone having url of some niuce tutorial to compile new kernel for ubuntu 10.10?

It isn't hard to do, but a painless way to learn is to install a ubuntu 10.10 instance in a virtualbox and try it all in the box. If you screw up, who cares. After you have been through the process once it won't be intimidating to do it for your real OS.

Yes, it's indeed quite easy to compile your own kernel, and virtualbox is a good idea. (For compiling you won't actually need the virtualbox, but for booting from it without worries that you broke something, virtualbox sure comes in handy.)

I use "sudo make menuconfig", which gives you a text-based menu, there may also be a graphical version. I would not recommend "sudo make config", as that only gives you a long list of questions to answer.

Anyway, the trick is to read all the documention, and stick with safe choices, if you do not know what you are doing.

Re: The ~200 Line Linux Kernel Patch That Does Wonders

#16

Earlier quoted context omitted.

OT: is "make -j64" overkill unless you have dozens of cores or am I missing something?

make -j$(2N + 1) is roughly where minimal compile times are.

Where N is the number of physical cores? I do not use hyper-threading (it tends to be bad for the floating point and bandwidth limited operations that I do), but usually find minimal compile times at N+1 jobs (but with little penalty for several more).

Re: The ~200 Line Linux Kernel Patch That Does Wonders

#17

It's not down for me... but here's the text: In recent weeks and months there has been quite a bit of work towards improving the responsiveness of the Linux desktop with some very significant milestones building up recently and new patches continuing to come. This work is greatly improving the experience of the Linux desktop when the computer is withstanding a great deal of CPU load and memory strain. Fortunately, th…

OT: is "make -j64" overkill unless you have dozens of cores or am I missing something?

You're right - but that was the point. The patch was trying to fix problems with the process scheduler, and "-j64" is going to make lots of processes that want to do work and need scheduling.

Re: The ~200 Line Linux Kernel Patch That Does Wonders

#18

Earlier quoted context omitted.

make -j$(2N + 1) is roughly where minimal compile times are.

Where N is the number of physical cores? I do not use hyper-threading (it tends to be bad for the floating point and bandwidth limited operations that I do), but usually find minimal compile times at N+1 jobs (but with little penalty for several more).

It depends on many factors what the optimal number of concurrent builds is, but the bottom line is that you want to maximize your CPU utilization and minimize context switching.

If you think that one extra concurrent job is enough to fill CPU utilization in the time that other jobs are blocking on iowait, then you are fine.

So, bottom line, factors to think about:

- your i/o throughput for writing the generated object files;

- the complexity of the code being compiled, - template-rich C++ code has a lot higher CPU usage versus i/o ratio

- the amount of cores in your system

Re: The ~200 Line Linux Kernel Patch That Does Wonders

#19
post #15

Earlier quoted context omitted.

It isn't hard to do, but a painless way to learn is to install a ubuntu 10.10 instance in a virtualbox and try it all in the box. If you screw up, who cares. After you have been through the process once it won't be intimidating to do it for your real OS.

Yes, it's indeed quite easy to compile your own kernel, and virtualbox is a good idea. (For compiling you won't actually need the virtualbox, but for booting from it without worries that you broke something, virtualbox sure comes in handy.) I use "sudo make menuconfig", which gives you a text-based menu, there may also be a graphical version. I would not recommend "sudo make config", as that only gives you a long lis…

  # sudo make xconfig
should give you a point-and-click interface to the same menu. I haven't used it in years, but it was pretty clunky back then. It's just nicer to poke around in than the text-mode menu.

Re: The ~200 Line Linux Kernel Patch That Does Wonders

#20

Earlier quoted context omitted.

make -j$(2N + 1) is roughly where minimal compile times are.

Where N is the number of physical cores? I do not use hyper-threading (it tends to be bad for the floating point and bandwidth limited operations that I do), but usually find minimal compile times at N+1 jobs (but with little penalty for several more).

I have 4 cores with hyperthreading enabled (so 8 "threads"), and find that -j10 is the fastest.
Post reply on HN