Jump to content

Tuning The Kernel With A Genetic Algorithm


Huerzo
 Share

Recommended Posts

Link to story

 

OK. I admit. Know I'm talking about an area I'm not completely familiar with, but I've some experience. I read the article and I came up with some ideas.

 

Whilst Genetic Algoritms may seem just another nice (and funny) tuning technique, I'm having a view that they'll playing a major role when optimizing Linux kernel (and other program code). Why?

 

1. They will always produce the best possible result (if given time enough)

2. They fit themselves to different environments and still produce the best possible result -> same code, manual tweaking not necessary (OK, now I broke somebody's heart :lol:)

 

So, eventually they are saving much both developers' and users' time. At least I'm fascinated by the vision that computer themselves are doing the dull and dirty work of tweaking softwares to approach better computing.

 

For example, there's been a lot of talk that the boot-up time of linux is too long. And I've read that there will be done some research what's the best possible order launcing processes while booting system up (article). I see this could be an excellent chance to use Genetic Algorithms to find out the right order.

 

The series of processes could be one "chromosome string" and one process one chromosome in that string. First mixing processes to random order, then using UML (User mode linux) to see if "the mix" works. Of course, timer is running to find out how long the boot will take, Then best chromosomes are mixed together to reach the optimal solution. And new evolution rounds until we have an optimal process starting sequence.

 

Of course this is rough and simple view, I've never compiled a kernel (or tweaked it), so I guess much more details are needed to take on account before "something" happens. And much time.

 

But I guess this could be done. Or have I got something wrong?

Link to comment
Share on other sites

  • 2 weeks later...

If you are interested in testing the genetic algorithm get yourself the latest kernel sources, 2.6.11-r1, plus the 2.6.11-r1-nitro0e patch and compile it.

IMHO the nitro patchset is the best around. Not only it will make your kernel run faster and better but includes bleeding edge stuff too, a la Gentoo. ;)

 

Here's the link: Nitro

 

I'm testing it right now. Here are my results:

 

Alex ~ # cat /proc/genetic/as-ioscheduler
generation_number:      46
num_children:           8
child_number:           6
num_mutations:          8
avg_fitness:            40743
last_gen_avg_fitness:   5142

Fitness history
generation(30): 8666
generation(31): 3365
generation(32): 7805
generation(33): 6028
generation(34): 11129
generation(35): 7120
generation(36): 7028
generation(37): 8385
generation(38): 7102
generation(39): 12384
generation(40): 8068
generation(41): 29428
generation(42): 40714
generation(43): 9028
generation(44): 6857
generation(45): 5142
Alex ~ #

Edited by a13x
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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
 Share

×
×
  • Create New...