What are the VM motivations??
<rant>
I've been reading the VM thread off-and-on for, oh, the last
8 _years_ on linux-kernel. It doesn't seem that much progress gets made in any one direction. For every throughput optimination for servers, the desktop people yell 'interactivity'. For every 'long-disk-idle' desire the laptop guys have, others want large buffer caches.
It goes back and forth. Everybody pulling from all sides, and
the VM performance has stayed (mostly) in the center.
Well, I have an idea. Let's take a page from the Neural
Network guys (not the code, just the ideas), and look at VM from a motivational perspective.
What if the VM were your little Tuxigachi. A little critter
that lived in your computer, handling all the memory, swap, and cache management. What would be the positive and negative feedback you'd give him to tell him how well he's doing VM?
Here's a short, off-the-cuff list that hopefully most
everyone can agree on.
Positive
--------
* Low system CPU load for the VM timeslice
* Process IO requests / Disk IO is less than 1.0
* Large idle times between disk activity
* Process don't have to wait long for pages from VM.
* etc.
Negative
--------
* High CPU usage for VM
* High disk IO for low number of process IO requests.
* Disk is rarely idle
* Processes stall for a long time waiting for VM.
* Deadlocks (fatal!)
* etc.
One we know how we would 'train' our little VM critter, we
will know how to measure its performance. Once we have measures, we can have good benchmarks. Once we have good benchmarks - we can pick a good VM alg.
Or heck, let's just make the VM a _real_ Neural Network, that
self trains itself to the load you put on the system. Hideously complex and evil? Well, why not wire up that roach on the floor, eating that stale cheese doodle. It can't do any worse job on VM that some of the VM patches I've seen...
</rant>
Signature · 4 lines
Jason McMullan, Senior Linux Consultant Linuxcare, Inc. 412.432.6457 tel, 412.656.3519 cell [email protected], http://www.linuxcare.com/ Linuxcare. Putting open source to work.
Quoted 10 lines · Jason McMullan
One we know how we would 'train' our little VM critter, we
will know how to measure its performance. Once we have measures, we can have good benchmarks. Once we have good benchmarks - we can pick a good VM alg.Or heck, let's just make the VM a _real_ Neural Network, that
self trains itself to the load you put on the system. Hideously complex and evil? Well, why not wire up that roach on the floor, eating that stale cheese doodle. It can't do any worse job on VM that some of the VM patches I've seen...
I can see it now... "Care and Feeding of your linux kernel VM for Dummies"
justin
Quoted 6 lines · Justin Guyett
Quoted 4 lines
One we know how we would 'train' our little VM critter, we
will know how to measure its performance. Once we have measures, we can have good benchmarks. Once we have good benchmarks - we can pick a good VM alg.I can see it now... "Care and Feeding of your linux kernel VM for Dummies"
Shouldn't that be "by Dummies(tm)" ? ;)
Rik
--
Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose...
http://www.surriel.com/ http://distro.conectiva.com/
Send all your spam to [email protected] (spam digging piggy)
Quoted 3 lines · Jason McMullan
Or heck, let's just make the VM a _real_ Neural Network,
that self trains itself to the load you put on the system. Hideously complex and evil?
Considering the amount of parameters the neural network would have to tune, and the fact that there are no easy parameters to tune, good luck...
Quoted 2 lines
the floor, eating that stale cheese doodle. It can't do any worse job on VM that some of the VM patches I've seen...
You'd be surprised.
Rik
--
Executive summary of a recent Microsoft press release:
"we are concerned about the GNU General Public License (GPL)"
http://www.surriel.com/
Quoted 11 lines · Rik van Riel
Quoted 3 lines · Jason McMullan
Or heck, let's just make the VM a _real_ Neural Network,
that self trains itself to the load you put on the system. Hideously complex and evil?Considering the amount of parameters the neural network would have to tune, and the fact that there are no easy parameters to tune, good luck...
Would never work with the ac-series. Not enough time to form a neural pattern between builds. There is a semi-prior art here. Unix on the Tandem (now Compaq) Helix shipped (and maybe still does) with a Neural Net for system sanity and tuning. Only problem is that the learning period usually exceeds the average time between installing releases (communications customers). 8^)
Now if it was a FAST LEARNER...
Quoted 18 lines
Quoted 2 lines
the floor, eating that stale cheese doodle. It can't do any worse job on VM that some of the VM patches I've seen...
You'd be surprised.
Rik
--
Executive summary of a recent Microsoft press release:
"we are concerned about the GNU General Public License (GPL)"http://www.surriel.com/http://www.conectiva.com/ http://distro.conectiva.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Sat, 23 Jun 2001, watermodem wrote:
[snip interior quotes]
Quoted 8 lines
Would never work with the ac-series. Not enough time to form a neural pattern between builds. There is a semi-prior art here. Unix on the Tandem (now Compaq) Helix shipped (and maybe still does) with a Neural Net for system sanity and tuning. Only problem is that the learning period usually exceeds the average time between installing releases (communications customers). 8^)
For a less ambitious approach that worked fairly well for a lot of sites (including mine) see also VMS Autogen. It was nice, having a mechanical "expert" looking over my shoulder, making suggestions, double-checking my ideas, etc. One run a week was usually enough to tune a system pretty well, for a general timesharing/batch/modest services load.
Signature · 2 lines
Mark H. Wood, Lead System Programmer [email protected] Make a good day.
Quoted 40 lines · Jason McMullan
<rant>
I've been reading the VM thread off-and-on for, oh, the last
8 _years_ on linux-kernel. It doesn't seem that much progress gets made in any one direction. For every throughput optimination for servers, the desktop people yell 'interactivity'. For every 'long-disk-idle' desire the laptop guys have, others want large buffer caches.It goes back and forth. Everybody pulling from all sides, and
the VM performance has stayed (mostly) in the center.Well, I have an idea. Let's take a page from the Neural
Network guys (not the code, just the ideas), and look at VM from a motivational perspective.What if the VM were your little Tuxigachi. A little critter
that lived in your computer, handling all the memory, swap, and cache management. What would be the positive and negative feedback you'd give him to tell him how well he's doing VM?Here's a short, off-the-cuff list that hopefully most
everyone can agree on.Positive
--------
* Low system CPU load for the VM timeslice
* Process IO requests / Disk IO is less than 1.0
* Large idle times between disk activity
* Process don't have to wait long for pages from VM.
* etc.Negative
--------
* High CPU usage for VM
* High disk IO for low number of process IO requests.
* Disk is rarely idle
* Processes stall for a long time waiting for VM.
* Deadlocks (fatal!)
* etc.
Quoted 4 lines
One we know how we would 'train' our little VM critter, we
will know how to measure its performance. Once we have measures, we can have good benchmarks. Once we have good benchmarks - we can pick a good VM alg.
We are talking with the OSDL people (http://www.osdlab.org) to setup an automatic testing system (differents benchmarks, different configurations, etc) which will give us a wider notion of VM changes wrt performance.
Quoted 6 lines · Jason McMullan
One we know how we would 'train' our little VM critter, we
will know how to measure its performance. Once we have measures, we can have good benchmarks. Once we have good benchmarks - we can pick a good VM alg.Or heck, let's just make the VM a _real_ Neural Network, that
OK. I challenge you to come up with:
1) the set of inputs for the neural network
2) the set of outputs
3) the goal for training the thing
I'm pretty fed up with people who want to "change the VM" but never give any details of their ideas.
regards,
Rik
--
Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose...
http://www.surriel.com/ http://distro.conectiva.com/
Send all your spam to [email protected] (spam digging piggy)
Quoted 8 lines · Rik van Riel
OK. I challenge you to come up with:
1) the set of inputs for the neural network
2) the set of outputs
3) the goal for training the thingI'm pretty fed up with people who want to "change the VM" but never give any details of their ideas.
Uhh. That's not what I was ranting about. What I was
ranting about is that we have never 'put to paper' the requirements ('motiviations') for a good VM, nor have we looked at said nonexistent list and figured out what instrumentation would be needed.
I don't now that much about VM, but I do know a bunch of
people each scratching their own itch, and most of them not looking at the bigger picture. Linus, RvR, etc. excepted. Mostly. ;^)
The whole 'neural network' bit was mostly troll. Sorry,
I got a little carried away at that point.
Signature · 4 lines
Jason McMullan, Senior Linux Consultant Linuxcare, Inc. 412.432.6457 tel, 412.656.3519 cell [email protected], http://www.linuxcare.com/ Linuxcare. Putting open source to work.
Quoted 5 lines · Jason McMullan
Uhh. That's not what I was ranting about. What I was
ranting about is that we have never 'put to paper' the requirements ('motiviations') for a good VM, nor have we looked at said nonexistent list and figured out what instrumentation would be needed.
But we have. The fact that you missed the event doesn't make it any less true.
Rik
--
Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose...
http://www.surriel.com/ http://distro.conectiva.com/
Send all your spam to [email protected] (spam digging piggy)
Quoted 9 lines · Rik van Riel
Quoted 5 lines · Jason McMullan
Uhh. That's not what I was ranting about. What I was
ranting about is that we have never 'put to paper' the requirements ('motiviations') for a good VM, nor have we looked at said nonexistent list and figured out what instrumentation would be needed.But we have. The fact that you missed the event doesn't make it any less true.
Excellent! Where can I find this? I would be most
interested in what your considerations for a good VM are. (It'd probably be a good thing to reference people to when they start arguing off-the-cuff about VMs, eh?)
Signature · 4 lines
Jason McMullan, Senior Linux Consultant Linuxcare, Inc. 412.432.6457 tel, 412.656.3519 cell [email protected], http://www.linuxcare.com/ Linuxcare. Putting open source to work.
Quoted 8 lines · Jason McMullan
Quoted 7 lines · Rik van Riel
Quoted 5 lines · Jason McMullan
Uhh. That's not what I was ranting about. What I was
ranting about is that we have never 'put to paper' the requirements ('motiviations') for a good VM, nor have we looked at said nonexistent list and figured out what instrumentation would be needed.
Quoted 7 lines
Quoted 2 lines
But we have. The fact that you missed the event doesn't make it any less true.
Excellent! Where can I find this? I would be most
interested in what your considerations for a good VM are. (It'd probably be a good thing to reference people to when they start arguing off-the-cuff about VMs, eh?)
Over the last year there has been quite a bit of discussion with Stephen Tweedie, Matt Dillon and more people. Parts of it can be found on http://linux-mm.org/
The conclusion of most of this discussion is in my FREENIX paper, which can be found at http://www.surriel.com/lectures/.
regards,
Rik
--
Executive summary of a recent Microsoft press release:
"we are concerned about the GNU General Public License (GPL)"
http://www.surriel.com/
Quoted 2 lines
The conclusion of most of this discussion is in my FREENIX paper, which can be found at http://www.surriel.com/lectures/.
Aha... that paper answers a lot of the questions I had about how things work. I seem to remember asking some of them, too, and didn't get an answer... :P
Signature · 7 lines
-------------------------------------------------------------- from: Jonathan "Chromatix" Morton mail: [email protected] (not for attachments) website: http://www.chromatix.uklinux.net/vnc/ geekcode: GCS$/E dpu(!) s:- a20 C+++ UL++ P L+++ E W+ N- o? K? w--- O-- M++$ V? PS PE- Y+ PGP++ t- 5- X- R !tv b++ DI+++ D G e+ h+ r++ y+(*) tagline: The key to knowledge is not to rely on people to teach you it.
Quoted 6 lines · Rik van Riel
Over the last year there has been quite a bit of discussion with Stephen Tweedie, Matt Dillon and more people. Parts of it can be found on http://linux-mm.org/
The conclusion of most of this discussion is in my FREENIX paper, which can be found at http://www.surriel.com/lectures/.
[Just finished reading your paper, and hit the linux-mm.org site]
Good overview of the Linux 2.4 VM. Although I do
have some questions...
* When was the 'FREENIX' paper published? I could find no date for it.
* What workloads would you recommend for testing whether a VM is 'well balanced' or not?
* Would it be reasonable to have different 'default' tunings for the kernel's VM based upon memory/swap size/bandwidth? Personally, I feel that swap bandwidth is an oft overlooked parameter in estimating VM performance.
Signature · 4 lines
Jason McMullan, Senior Linux Consultant Linuxcare, Inc. 412.432.6457 tel, 412.656.3519 cell [email protected], http://www.linuxcare.com/ Linuxcare. Putting open source to work.
Quoted 8 lines · Jason McMullan
Quoted 6 lines · Rik van Riel
Over the last year there has been quite a bit of discussion with Stephen Tweedie, Matt Dillon and more people. Parts of it can be found on http://linux-mm.org/
The conclusion of most of this discussion is in my FREENIX paper, which can be found at http://www.surriel.com/lectures/.
Quoted 7 lines
[Just finished reading your paper, and hit the linux-mm.org site]
Good overview of the Linux 2.4 VM. Although I do
have some questions...* When was the 'FREENIX' paper published? I could find no date for it.
Next week. Shhhhh... ;)
Quoted 2 lines
* What workloads would you recommend for testing whether a VM is 'well balanced' or not?
Whatever it is you always do. We're not interested in seeing if the VM works well in unrealistic benchmarks, we want it to run well in your normal workload.
Quoted 4 lines
* Would it be reasonable to have different 'default' tunings for the kernel's VM based upon memory/swap size/bandwidth? Personally, I feel that swap bandwidth is an oft overlooked parameter in estimating VM performance.
Maybe. Suggestions and patches on what to tune and how are welcome. Extremely general handwaving generally doesn't add much value to the discussion.
regards,
Rik
--
Executive summary of a recent Microsoft press release:
"we are concerned about the GNU General Public License (GPL)"
http://www.surriel.com/
I read this thread as asking the question:
If VM management is viewed as an optimization problem,
then what exactly is the function that you are optimizing and what are the constraints?
If you could express that well with a even a very loose model, then the code could be reviewed to see if it was really doing what was intended and assumptions could be tested.
This seems like a reasonable request.
Quoted 23 lines · Jason McMullan
Quoted 8 lines · Rik van Riel
OK. I challenge you to come up with:
1) the set of inputs for the neural network
2) the set of outputs
3) the goal for training the thingI'm pretty fed up with people who want to "change the VM" but never give any details of their ideas.
Uhh. That's not what I was ranting about. What I was
ranting about is that we have never 'put to paper' the requirements ('motiviations') for a good VM, nor have we looked at said nonexistent list and figured out what instrumentation would be needed.I don't now that much about VM, but I do know a bunch of
people each scratching their own itch, and most of them not looking at the bigger picture. Linus, RvR, etc. excepted. Mostly. ;^)The whole 'neural network' bit was mostly troll. Sorry,
I got a little carried away at that point.
Quoted 10 lines
--
Jason McMullan, Senior Linux Consultant
Linuxcare, Inc. 412.432.6457 tel, 412.656.3519 cell [email protected], http://www.linuxcare.com/
Linuxcare. Putting open source to work.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
--
---------------------------------------------------
Russell Leighton [email protected]
---------------------------------------------------
Quoted 9 lines · Russell Leighton
I read this thread as asking the question:
If VM management is viewed as an optimization problem, then what exactly is the function that you are optimizing and what are
the constraints?If you could express that well with a even a very loose model, then the code could be reviewed to see if it was really doing what was intended and assumptions could be tested.
May I suggested an algorithm?
- Write down what you think the optimization constraints are. (be specific, for example, enumerate all the flavors of page types - process code, process data, page cache file data, page cache swap cache, anonymous, shmem, etc.)
- Write down what you think the current algorithms are. (again, be specific, use file names, function names, pseudocode and snippets of existing code.)
- Send it to Rik. He'll tell you if it's right.
- Because life is short and should not be boring, cc it to Andrea as well
;-)
This way you save everybody's time and ensure you understand what's really going on. Not to mention coming up with a document worth its weight in dilithium crystals.
--
Daniel
Quoted 19 lines · Colonel
Quoted 18 lines · you
Quoted 9 lines · Russell Leighton
I read this thread as asking the question:
If VM management is viewed as an optimization problem, then what exactly is the function that you are optimizing and what
are the constraints?If you could express that well with a even a very loose model, then the code could be reviewed to see if it was really doing what was intended and assumptions could be tested.
May I suggest an algorithm?
- Write down what you think the optimization constraints are. (be specific, for example, enumerate all the flavors of page types - process code, process data, page cache file data, page cache swap cache, anonymous, shmem, etc.)
Quoted 8 lines
Quoted 5 lines
- Write down what you think the current algorithms are. (again, be specific, use file names, function names, pseudocode and snippets of existing code.)
- Send it to Rik. He'll tell you if it's right.
POST IT. Give the rest of us some clues and the opportunity to check evaluator's replies.
Well, if you try that strategy you'll find you never get around to posting it because you'll be too worried about getting it right. The point is not to get it right, it's to get a starting point down on (virtual) paper. I'd strongly suggest passing something like that around for comment privately first.
*Then* post it.
(and convince me you're not just talking)
--
Daniel
Quoted 10 lines · Colonel
Quoted 8 lines
Quoted 2 lines
POST IT. Give the rest of us some clues and the opportunity to check evaluator's replies.
Well, if you try that strategy you'll find you never get around to posting it because you'll be too worried about getting it right. The point is not to get it right, it's to get a starting point down on (virtual) paper. I'd strongly suggest passing something like that around for comment privately first.
Well, it does seem that some ego is involved here...
Not in this case. Do it whichever way you want, the point is: do it (don't just talk about it)
--
Daniel
I'm hopelessly behind on my mail, so this has probably been dealt with, already, but here goes: It's a userspace problem.
That is, any automagical VM tuner ought to be a daemon. If the kernel doesn't expose enough information or knobs to make a good VM tuner, add what is needed.
Meanwhile, if anyone has a good handle on how to tune for interactivity vs. power saving vs. server performance, it seems that a lot of sysadmin.s need a good reference *from the sysadmin point of view* on how to tune manually for different sorts of loads. If the kernel is tunable in ways that are understandable, it'll be fairly easy to tune by hand and the daemon may not be needed at all. And again, we have a userspace solution that doesn't add much weight to the kernel.
The original post does make a valuable point: resource allocation is a problem with *no general solution*, because the goodness of a solution depends on the values of the person applying it.
Signature · 2 lines
Mark H. Wood, Lead System Programmer [email protected] Make a good day.