Debate on Linux Virtual Memory Handling
xturnip sent us a good piece running over at Byte about Linux's VM. Somewhat more technical then the stuff we usually see online, this one talks about different VM systems, and the egos in the kernel. Its worth a read.
He seems to think a lot in favor of the Andrea VM.
That's ok to me, but he might want to take notice of the fact that linus didn't accept Rik's patches a lot and that 2.4.9 still had actually the VM of 2.4.5. The -ac tree was more up to date.
So for a good comparison you'll need to compare the linus and the ac tree.
Well, don't worry about that. We can get you back before you leave. (Dr. Who)
I say, include it all in the kernel and make it configurable by the user. After all, most Linux users are pretty tech-savvy, they are unlikely to wreck their machines (the way windoze lusers do every time they tweak their registry).
What do others think ?
this one goes out to all the djs
TROLL TUESDAY - TROLLIN FOR JESUS!
(last post)
Nobody has yet dared to speak of a Linux source fork, but this is dangerously close to one.
Is this truly dangerous? If so, why? Why not let the 2 VM's compete and the users will decide?
Better to split than stagnate.
Oh please. Have you ever worked on a commercial software project? I've seen just as much if not more ego in moronic engineering team meetings at my enterprise software company. Without a single strong technical leader OR a group of smart people who all equally respect each other's opinions, the SAME THING happens on a commercial project. I've watched a Director of Engineering call meetings almost every day for 3 weeks in a row because he didn't know how to solve exactly this sort of problem. In the end he just decided to go with what the person with the most years of experience said and to get the CEO to give him blanket license to make that technical decision, though none of the other engineers agreed with it - they were all too conflict averse to speak up and too afraid about losing there jobs just as the economy was tanking (he made a bad decision indeed and the project suffered greatly for it, getting delayed by 3-4 months and even then never delivering a large portion of the promised features because this architectural decision made them impossible). That company (mine, unfortunately) is most likely going out of business soon. So don't give me this crap that ego only adversely affects Open Source projects.
I think this shows the power of open source software. Everyone, thought Rik's system would be great. Unfortunately it was not, so Linus used Arcangeli's new VM code. Problem solved. Stable as ever. This major OS change happened over a couple months I bet Redmond couldn't make that happen if a VM bug was found now in XP.
He alludes to some FreeBSD vs. Linux benchmarks at the end of the peice. Anyone got any links?
So in a Linux Distro install it can ask you "Are you using this computer as a (a) server (b) Multimedia (c) Desktop (d) Games (e) Mixture, and then it can install an appropriate kernel for you with the appropriate VM and preemption patches. A multimedia computer would like the low latency preemption, for example...
The linux kernel has 5 main parts. There is no reason that each part cannot be modularised away in order to get alternative functionality depending on build options and the target environment.
Do you think that Windows 2000 DataCenter has the same VM system as Windows 2000 Professional? I severely doubt it. ANd I bet that MS' in-house kernel build tool will have VM type as a selectable option, as well as many other subsystems.
This article by Moshe Mar talks about the linux kernel, and especially a recent split in the community in which/whose VM to use.
The "old" vm, the article says, had some relative impressive problems- swapoff with full memory and you could sit in front of a swap-crazy machine for 15 minutes, machines with small memory (40 MB or less) could experience sudden swap storms up to kernel 2.4.7, and the amount of swap available in the system depended on the amount of memory (as opposed to the system in 2.2 where the total memory was RAM+swap).
The VM used in 2.4 'till 2.4.10 was written (it seems from the article) in large part by Rik Van Riel. Later Andrea Arcangeli (in Sept) wrote a whole new VM, which was accepted into the kernel. Viola, new Vm in 2.4.10.
The article discusses that Alan Cox doesn't like the new VM as much, and has stuck with the old one. The author of the article seems to be in support of Andrea's new VM.
The article then goes on to discuss kernel preemption- pros (low latency), cons (lower throughput/power), and on which machines such things are important (servers, vs PCs).
Moshe Bar seems to indicate that Alan Cox is creating some kind of fork of the Linux kernel. Actually, -ac kernels are alwasys different from Linux kernels to some extent, since they include slightly more experimental code (e.g. ext3), or code that Linus has not had a chance to review yet. This way, the experimental code gets more testing before going into official Linus kernels. You can read more about -ac kernels at KernelNewbies.Org.
As anyone following LKML knows, Alan thinks that drastic VM changes should be reserved for 2.5, and so continues to keep Rik's VM going. This actually helps quite a bit as both VMs get tested and there have been several comparative tests conducted leading to improvements in both VMs. Competition in this case is certainly helping Linux.
Oh and for all you fork conspirators, here's another fact: Andrea Arcangeli also releases his own kernel releases, called -aa. I don't think any of these are considered forks; everyone understands that this way pacthes get more testing, "crosstalk" between the different flavors is a given.
Much ado about nothing, IMHO...
-Rahul
Genebrew
that sounds less like ego and more like a mistake on the employees part. Yeah conflicts keep your mouth shut at times but I am sure there was discussion among the rest of you that would have let you know that a good majority of those people you worked w/disagreed w/the route of the project.
Why not all express your opinion instead of being passive participants?
Sounds like it was a management fuck up not an ego issue.
Then again, I really don't know how it works in the real world, or so that's what they always seem to tell me.
The article seems to come out in favour of the new VM code. It makes it sound like it works much more effectively. So, why does Alan Cox continue with the old VM code? There must be some reason why he thinks it's better, or why go through the effort of continually patching the old code into the newer kernel?
Which is what he's talking about.
Best Slashdot Co
Who says an article cant be biased ?
Its an editorial for crying out loud
I have been wondering when the "masses" would figure out this is a MAJOR issue with the current linux kernel. I use the -ac patches because of various issues not in the main branch, fs support etc. on my workstations , I have to say the VM in the main 2.4.12-13 seems much more predictable and solid, I think im just going to patch against the main for ext3 until this gets hammered out. Alan seems like a very gifted indivdual as does Linus, but it seems as if Alan cant sometimes say hey I was wrong this is a better way to do it, or lets for the goals of the effort, decide and move on improving it as best we can. The author was very correct in his statment of you can fix something that sucks so it dosent suck as much but in the end it still sucks. I still dont get what alans problem is , is it because he didnt write it ? Or is it because its new and less tested ?
Excellent article in all.
Sig went tro...aahemmm.....fishing........
See this posting to LKML:
Alans talking about switching VMs in -ac kernels
Genebrew
From the article - " All earlier 2.4 kernels (since 2.3.12) needed at least the same amount of RAM in swap and then more to give you additional virtual memory. This meant that on an 8-GB server, you needed to put aside almost a full 9-GB disk just to be able to swap"
Is this accurate? For just about everything I've always gone with 512Mb of swap, regardless of whether I had more or less RAM (not that I'm technically proficient or anything). This would also be a shortcoming of Linux since it would make it a pain in the ass upgrading RAM if you needed to allocate more swap space somewhere else each time. Well I'm all for the newer VM. Simple is good.
So your Director of Engineering couldn't direct his way out of a paper bag. Now please come up with a real refutation of the point made in the original post? You can't, because I am right.
The claim is not that ego only affects Open Source projects. The fact is that in Open Source projects nobody has the final authority and can keep progress rolling in the face of ego. Even if Linus says no to one option and yes to another, an equally respected leader can choose to ignore that decision and go his own way, taking a fair number of followers with him, dividing the effort.
Moshe Bar argues two points I vehemently disagree with:
(1) Alan made a mistake in not switching to Andrea's VM. Alan is trying to maintain a stable kernel. Switching out large chunks of the VM is the last thing to do to achieve those goals. Alan will switch in due time.
(2) The preemptible kernel is unfit for certain scenarios. Everyone I know loves the preemptible kernel. It gets good reports on lkml and the kernel news sites - Hell, it even got good comments here!
I realize this is an editorial, and I understand everyone has an opinion, but if it isn't true it isn't true. An opinion can't contradict fact.
Tim
Is probably like arguing over the "best text editor".
Best Slashdot Co
If they are to truly compete, then we should be allowed to choose between the Andrea VM code and the Rik VM code when we compile our beloved kernels.
However, a kernel fork would not neccessarily(sp?) be a bad thing, as long as the forking doesn't break the ability to run binaries. I'd hate to have to recompile my entire system just switch between VM-s.
Stop the brainwash
I don't care if you want to swear by the Linus kernel, but it gets killed by IO. I mean, come on, I'm using 2.4.12, and I can't rip a CD an play an MP3. Under the AC series, I can rip CDs, play MP3s, watch divx movies, surf the web, untar a file, and have a compile job going at the same time. Even for more usual setups, like viewing a video without doing anything else, the Linus kernel drops frames left and right, whereas the AC series laughs at it. Don't tell me I need to use mplayer with SDL, because I do.
Because I treat my Linux box as though it were a Windows box (one of the reason I switched over to Linux for everything is that the widgets in GTK are prettier than the widgets in Windows -- it's nice to have people ask me how to get their desktops to look like mine and tell them they have to install linux) and I expect it run at least as well as a Windows machine, I must use the AC series. While I'm sure that the Linus kernel has it's applications, it is simply unacceptable for replacing the Windows kernel.
Mod me flamebait or troll if you want, but I speak the truth. I have a Thunderbird-750 with 224 MB of ram, and I find it simply unacceptable when I can't run Quake or view movies under linux because of the Linus kernel. When mp3s skip because I'm moving some data around, it tells me that something is wrong with the Linus kernel. I'm glad that I had a friend who introduced me to the AC series, or I would have given up on linux. Plain and simple, politics aside, the end user doesn't care that he's being loyal to Linus the Great, he just cares that he can view that movie. If Windows outperforms linux in multimedia, he'll use Windows.
Join the Slashcott! Stay away entirely Feb 10 thru Feb 17! Close all tabs to prevent autorefresh!
I had a similar problem a while back... The company was designing a commercial software project.... Egos ruled the engineering meetings. Noone could agree on the correct way to write the modules. We couldn't even agree on what language to use. Some wanted to use ColdFusion, some wanted to use Delphi, some wanted to use Python, a few wanted to use PHP and some wanted to use Java. There was only one tech guru who could glue the whole project together...this guy wrote glue components which tied the whole system together, and bugfixed everyone's code (all in different languages). It was all going well, but the guy started to take longer and longer lunch breaks.... eventually the CEO followed him one day when he went on his lunch break ... it turned out that he was having sex with mares on a local farm. Of course, the CEO couldn't keep him on - but he still needed his technical expertise. Unfortuantely, rule of law overruled the need to keep the guy and he was fired. After that, the project just fell to peices and the company went out of business. And you thought Open Source projects had problems. Peh.
I have a large ext3 partition to store all my data and a 256MB partition of swap. I also have 384MB of RAM. Occasionally I'll hear the had drive grinding away like it's using the swap. I check and it is using the swap, but my real RAM isn't full yet. It's actually far from full, like 100MB free. I know if I don't have a swap partition it wont use it, but then I'll run out of memory sometimes, like when I have a huge pile of applications open at once. It really needs some work. I don't care about forks or anything, just make it work better.
The GeekNights podcast is going strong. Listen!
Does it support malloc correctly now (returning NULL when out of memory)?
The old linux VM seamed incredibly insiteful to me. It is far superior to any other operating systems that I've seen out there. It keeps good stats on how long its been since the page was last accessed and swaps pages accessed least recently first and gives a bonus to clean pages.
:) Don't cause so much strife by switching key elements of the kernel in a stable tree.
The problems they describe is a fault of the schedular for picking a process that had a lot of pages just swapped. If the memory gets low, you need to try to give processes that have all their pages in memory and aren't blocking priority so they can do their thing and hopefully free some ram up. Thats why the guy made the kill patch it sounds like, but it should rather suspend than kill. There is nothin you can do if you are just running too many processes anyhow though. You have to swap out a bunch of pages for one process to swap in the pages from another. It's called thrashing, and the only thing you can really do is give one priority over the other, or get more ram. Hey, rams cheap, buy more if your gonna use that much
I don't know how the guy pulled it off with the fact that paging is VERY arcitecture dependant. (the kernel pretty much ignores some of the features of X86 (segmentation) to make it more portable) I think their both right, but maybe linus should call it 2.6 so people can have some time to make their unofficial patches still work with it and have some time for testing before its used in a production environment.
Karma Clown
Hearing this, I want to upgrade, but the only ext3 patch(I use redhat 7.2) I have found is for the 2.2.19 kernel. Does anyone know where I can find one for 2.4.13?
I'm not kernel hacker, but this seams like a good opertunity to implement a pluggable vm archetecture. This would allow this debate to become moot, as well as allowing folks to load vm's that were talored for their specific work loads.
IMO both Rik's code (RVM) and Andrea's (AVM) were accepted prematurely, and Linus's ADD is the root of the problem here. Everyone thought the 2.2 VM was broken, so he jumped on RVM when it really hadn't received adequate testing with various workloads. Then, when that didn't work out, he did something even worse by jumping on AVM in the middle of a "stable" kernel series when it was totally undocumented and even less thoroughly tested than RVM. That's just bad software engineering, regardless of the quality of Rik's or Andrea's work.
Ideally, an "old-fashioned" alternative to RVM would have been maintained throughout the 2.3 process, as a fallback in case RVM turned out not to be ready for 2.4 - which was in fact the case. But this wasn't done, there was no alternative, and so RVM became the basis for 2.4. Once that decision was made it should not have been unmade by replacing RVM with AVM. Andrea's work should have been in the 2.5 tree, which should have been opened a long time ago to deal with precisely this sort of situation. 2.4 is not the last Linux kernel that will ever exist. We don't need to make it perfect. It would be far better to admit its imperfections, band-aid them as best we can, and try to get a head start on creating something better for 2.6. What we have instead is error on top of error, "not ready" replaced with "even less ready".
To clarify, I have nothing but the highest regard for both Rik's and Andrea's work. Obviously they have different ideas and attitudes. Rik has drawn on many sources in his design, resulting in a system that is both very advanced and very complicated. The process of reining in the complexity is still incomplete, but I still have hope that some day Rik will be able to come up with something that's really awesome, and he has always documented his ideas thoroughly. Andrea, by contrast, is much more pragmatic; he wants something that works now even if it's somewhat more limited in scope (e.g. by being almost impossible to reconcile with NUMA). The dark side of that "pragmatism" is that Andrea has skimped on non-code activities such as documenting or explaining the basic ideas on which his system is based. Nonetheless, both have done great work and should continue to do great work...in the 2.5 tree.
Slashdot - News for Herds. Stuff that Splatters.
Good, this would be an interesting benchmark.
Then, I changed the memory down to 192-MB RAM so as to stress the VM system more.
ok, this is fair, but you should also run with the same memory configuration you originally ran.
I also upgraded to the latest stable versions of Sendmail (8.12.1) and MySQL (version 3.23.42). Finally, I compiled everything with the latest version of gcc, 3.0.2, and tuned the two instances to the best of my knowledge (softupdates and increased maxusers for FreeBSD, and untouched default values for Linux).
NO!!!! why would you do this? Don't you want to know how the earlier linux/FreeBSD kernel compares to a later ones? Now instead of modifying one variable you've modified 3,846 variables. It's going to see if any improvements in FreeBSD/Linux are due to an updated kernel, compiler, mysql, etc etc. Go back to your original setup and only change the kernel, since I believe that's what you want to benchmark.
So your Director of Engineering couldn't direct his way out of a paper bag. Now please come up with a real refutation of the point made in the original post? You can't, because I am right.
Don't make pointless, baseless assertions.
The claim is not that ego only affects Open Source projects. The fact is that in Open Source projects nobody has the final authority and can keep progress rolling in the face of ego. Even if Linus says no to one option and yes to another, an equally respected leader can choose to ignore that decision and go his own way, taking a fair number of followers with him, dividing the effort.
The same thing can and does happen in commercial projects; instead of code forks you get mass firings, but the end result is the same. A manager with an overinflated ego is very bad for any project; be it open source or not; the difference is that, in open source, the clash between management (the project maintainer(s)) and programmers exists under the scrutiny of the public eye, whereas in a corporate setting the conflict is kept within the company walls.
One of the qualities, if not the top quality, of a good manager is the capability to admit that they are either wrong, or don't have sufficient information to make a decision.
--
I Hit the Karma Cap, and All I Got Was This Lousy
Why is so much time being wasted developing and re-developing a VM system when a very stable and robust VM system has existed for years in the FreeBsd system. Anyone thought about using that code (as per the terms of the license) as a starting point instead of this senseless writing and rewriting and sub-par performance?
The machine freezes EVERY time because of memory shortages. The kernel can't allocate pages for incoming network traffic, causing a backlog, causing processes to hang, causing further backlog.. then powie an unresponsive machine.
This was a common problem with kernels from about 2.4.1 up to 2.4.9 - the machine would gradually eat into swap further and further, failing to release no-longer-used swapspace, until it would go Out Of Memory (OOM) and attempt to kill the process that was eating all the memory. Frequently it would pick the wrong process to kill (sometimes even killing init) or would end up deadlocking.
I agree with you - that is no way for a virtual memory system to behave.
However, the Linux development process moves quickly once people get annoyed enough to actually do something about it, and that's precisely what has happened. Starting with 2.4.10, a new, simpler VM system has been used in the official Linus kernels, and I can say with some confidence that it has solved all the major problems with the 2.4 VM system, and continues to get significantly faster with every release.
If you haven't actually tried a new kernel yet (and from your problems it seems that you haven't), I suggest that you do - it's made the world of difference for me.
At the same time, the old 2.4 VM has lived on in the -ac series of kernels, and has become a great deal better there - some competition has made a big difference. Almost all of the major areas where it behaved badly have been fixed. However, my own impression is that it is still somewhat slower than the new VM.
The choice is yours which you want to run - my own recommendation would be for the new VM in the official Linus kernels, but others may disagree.
[OOM Killer]
NEWS FLASH they took this feature out because it was buggy.
Umm, no they didn't - it continues to exist in both the new VM in 2.4.13 and the old VM in the most recent 2.4.13-ac kernels. It does, however, now work correctly in both VMs. There are some philosphical arguments over whether killing processes is the best way of handling an Out Of Memory situation, but it is surely better than deadlocking the box, which is what most VM systems (including the famed FreeBSD's) do when OOM occurs.
It's been getting better with each dot release but it's still nothing you'd want to bet money on.
All I can say is that the new VM works great for me and lots of other people, even under extreme load. I can certainly understand your pain if you're using an older 2.4 kernel, but please try a recent one - the difference is astounding.
If you're still having problems with recent kernels, then I'm sure linux-kernel@vger.kernel.org would love to hear from you - and would certainly be a lot more useful to you than ranting on Slashdot. Getting the VM right is now priority number 1 for the kernel hackers.
Despite this major issue, a Linux based system is still more stable and in most cases faster than Windows 2000. Also, like the article mentions, take into account that Linux runs many different types of processors. Linux on SPARC is good and 21264 Alpha performance is mind-blowing. Keep up the good work.
I have read most of Moshe's articles at Byte and he hits me as the worst kind of dilettante; can't keep his mind made up, and is more interested in fashion then really helping solve any problems. It all about being on the inside and looking clever then anything else.
Am I wrong? I kinda hope so."think of it as evolution in action"
That company (mine, unfortunately) is most likely going out of business soon. So don't give me this crap that ego only adversely affects Open Source projects.
Gee, it's sad and all, but it's too bad you don't work for Microsoft...
*runs
We manage a LOT of servers and when we went gold with our new appliance, we decided on the 2.4.8 kernel (because it fixed a bunch of smbfs bugs that would slow down smb transfers to a few bytes/sec). Well, we started getting heavily loaded machines going offline. I'd arrive on site and not even be able to log in on the console. Hard drive light would be on steady and it was just thrashing itself to death.
Problem was, there machines, although supporting a lot of users, weren't supporting them simultaneously. It seemed that they would creep up to their limit of memory and once they arrived at the edge, the kernel couldn't figure out what to release, even though the machine only had one or two users at the time. It was the straw that broke the camel's back. So we're throw more RAM in the sucker, and wonder why the hell this never happened on the 2.2 kernels. I'd mutter that it probably had something to do with the VM, but since I'm not on the kernel mailing list and I hadn't heard any grumblings on any linux based news sites, I figured the problem was us. Well well well! This is a HUGE bug and I'm surprised that it was not addressed more publicly.
My desktop does this too from time to time. Swaps itself to death on a 2.4.8 kernel as well. Open staroffice 6.0 beta, gimp, and bunch of other random things and it eventually goes unstable. Never happened with the 2.2 series.
A compilin' I will go, a compilin' I will go!
Toddlers are the stormtroopers of the Lord of Entropy.
of course they keep the user info in a database...
anybody who this comes as a surprise to shouldn't come here anyway, because they must be really stupid.
And they have the right to keep information like who is banned, why, and etc.
Otherwise, leave..... i see no hypocrisy. they don't make you tell them your real name address and credit card number like the real privacy abusers.
This statement is pure bullshit. FreeBSD's VM is lightyears ahead from Linux' one. Same for SCSI subsystem. I once ran Oracle for Linux in a FreeBSD box with 2MB or RAM and 8MB of swap with 1500 concurrent users with no problem at all. A Linux box with 256MB was unable to handle it. Andrea wrote the VM in one month, that's the quality of Linux kernel code, re-code every release because last version sucked ass. Nice, really, nice.
The word you're thinking of is "THAN". How many times are you going to make this mistake? I don't think I've ever seen Taco post a story using the word "than" properly. It's always "then". Real professional site you got here, Taco-man.
Which kernel will RedHat use for their next Linux distribution?
Isn't that basically Microsofts argument as to why its ok for them to be a monoply? That competition is not efficient in the software industry?
In Peter Denning's classic paper, The Working Set Model of Program Behavior, Denning concluded that paged virtual memory was, at best, good for an effective 2X increase in memory size. When he wrote that paper in 1968, memory cost about a million dollars a megabyte, so a 2X increase was worth the headaches of a VM system. Today, with memory at a few hundred dollars a gigabyte, it looks less attractive. It's not that expensive to double the size of RAM today. It can be cheaper than adding a fast disk drive just for paging. Uses less power, too.
Disk as backing store gets worse as RAM gets faster. When Denning wrote that paper, the fastest backing devices (drums) rotated at around 10,000 RPM, for a 6,000 microsecond access time, and core memory cycle times were around 4us. So main memory was 1,500 times faster than backing store. Today, RAM cycle times have dropped to around 0.020us, but disks still top out around 10,000 RPM, making main memory 300,000 times faster than backing store. Thus, the relative cost of a page fault has increased by a factor of 200. This makes VM far less attractive today than it used to be. It's not getting any better, either.
The price of having virtual memory is terrible performance once paging between active processes starts. That's called "thrashing". On a server which is processing short transactions, you're much better off throttling at the transaction launch point (as, for example, where CGI programs launch) than going into thrashing. This requires some coordination between applications and memory allocation, but where most of the memory is used by Apache and its child processes, that's a viable option.
The main value of VM today is getting rid of dead code at run-time. A basic problem with shared libraries is that you load in the whole library, needed or not, when you need any function from it. This wastes memory, but after a while, the VM system will notice the unused pages and quietly release them. On a larger scale, the same problem is seen with dormant applications, a problem which has gotten totally out of hand in the Windows world, where far too much unwanted stuff launches at startup. VM ejects them from memory. That's what VM is really used for today.
So if you're actually page-faulting, VM is hurting, not helping.
I'd argue that it's time to go back to a swapping model - all of an app has to be in before it runs. That's where UNIX started; virtual memory didn't come in until 4.1BSD. But in support of this, apps need more information about the current memory situation. And they should be able to designate parts of their space as pageable, at least at the shared object/DLL level. Only a few apps (web servers, window managers) need much memory awareness, so that's feasible. Throttling needs to occur at a smart place, just before allocating substantial resources, such as CGI process launch or connection opening. By the time the VM system becomes involved, it's too late; resources are already overcommitted.
The big win from this is repeatable latency at the memory level. With all the interest in reducing kernel latency at the CPU level, it's time to address it at the memory level too.
QNX, the real-time OS, is worth looking at in this regard.
Well, I read his first article and I switched to FreeBSD, so I don't care about those flame wars anymore :)
While I normally take issue with the way Linus bullies a kernel issue based on what he perceives is technical merit, I have to agree with him on this one. First, if a better way of doing things has been found, even though it's in the middle of a stable series, it should be changed in order not to propagate wrong coding. I've been coding for a long time now and I still believe that if an error, bug or better coding scheme is found, it be implemented as soon as possible.
The problem with leaving the change till the 2.5 series is that the 2.5 series is nowhere in sight and development kernels usually take more than a year to cycle through (no matter what the kernel hackers say). The fact that 2.5 hasn't even begun may be an indicator of how long 2.5 will take to finish.
RedHat ships an -ac kernel with RH 7.2, I think 7.1's was also an -ac kernel.
Not pure -ac kernel, though, like most major distributions they also pull stuff from Linus and other kernel trees (there are others) so what they actually ship is really the "RedHat" tree.
DNA just wants to be free...
I really hate to say this, but I'm wondering if jumping ship to freebsd (etc) makes sense. I've been a major linux supporter for quite a long time, but I know that the *bsd guys have had their act together (good smp, good networking under load, etc) for a long time.
would it be all that crazy to adopt the VM system from the 'establishment' (bsd)? frequently the linux codebase DOES borrow from bsd. why is the VM system all that different?
--
"It is now safe to switch off your computer."
Oh an djust becuase there are two different vm's (Alan vs Linus) does not mean that there is an official fork. As well there is already companies like Redhat and Suse that release their own patches to the linux kernel that make them unpatchabe against the main tree.
Only 'flamers' flame!
IBM has said that they will open source any part of AIX that we would like. The AIX VM works well under high stress. Obviously it could not just be put as-is into Linux, but there must be a lot of good ideas/algorithms in it that could--arguably should--be moved to Linux. Why isn't anyone looking at doing this?
This is a link to the kernel-traffic discussion with details and basic benchmarks: here!.
http://blog.grcm.net/
I'd like to bring up a small example that the SAME thing can happen in your happy little closed-source world, too. I can sum it up like this: Windows - OS/2. Windows happened to be the one that succeeded.
Furthermore, when one authority is in the position to determine where progress goes, people tend to lose their jobs or otherwise be eliminated from the project for having a different philosophy. Rather than having two parts of the effort working on two projects, therefore being 100% productive, you have part of the effort working on one project, therefore not being 100% productive.
But, my real question for YOU is, did you just get up on the wrong side of the bed today? Your lover refuse to have sex with you? Or are you paid by Microsoft/Oracle/whatever to bash the open source development model every chance you get? Away with you, FUD!
"Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
Another area of Linux with problems (albeit mostly non-kernel related) is the threading model. For Christ's sake, grow up. "We can do kernel context switches fast enough for 1:1 threading model!". Pure hubris. Linux is unusable for any serious Java development.
Part of the problem with the design and redesign of the linux VM is an insistance with sticking with a few core design points that make it 100x harder to write. For instance, virtual memory overcommit spawns a whole bunch of ugly problems that must be solved in order to create a stable and fast system. If the core development team spent some time looking at past OS research then they would completly change their design criteria and a bunch of these problems would go away.
Another perfect example is the OOM killer. If the VMM could properly balance the workload (and it didn't overcommit) then there wouldn't be a need for code to select the 'correct' process to kill. Since the VM cannot balance correctly, the kernel developers spend massive amounts of time trying to write an OOM that functions correctly in the case where the VMM is wedged. This time would be better spent fixing the VMM so it never got into these states.
Why not just use the 640k limit and we wouldn't have any of these problems...
KidA
"Karma can only be portioned out by the cosmos." -Homer Simpson
I would've thought there would be many posts comparing and contrasting (and most likely flaming) the Linux and Windows' VM architectures. As a primarily Winddows user, this discussion is highly interesting and I would like to learn more about how these issues (VM page allocation, thrashing, kernel pre emption) are handled in NT land.
If he says so.
I have never experienced such "system freeze" swapping with Linux, since I started about 4 years ago. Felt like my Win95 days with 8Mb RAM were back.
With 256Mb RAM, I only need to open up a ~1Mb pdf with Acroreader to experience some extreme disk thrashing that takes an age to give back my system. Something I've never seen happen with Linux.
War crimes, torture, lies, illegal spying... Would someone give Bush a blowjob, already, so he can be impeached?
would be hidden behind some interface, and that it's just a matter of plugging in a different implementation. If it's that difficult to switch between the two, something's badly broken in the design.
But what do I know, I'm just another Slashdolt, who couldn't code his way out of a paper bag if I tried.
I want to hear more about music videos, and computer games.
1G ram is under $100. I just turned the VM off. Some folk I know that do large clustering solutions are doing the same thing. Who is using VM these days? And is it really worth the headache, rather than spending a few dollars?
I guess he forgot to put his C program to stress test the kernel inside of a
block. Anyway, the #include line is missing a header file to include. It's supposed to read: #include Hope this helps.A musician without the RIAA, is like a fish without a bicycle.
Gosh! When are you Slashdot people going to learn the difference between the words "then" and "than"? Learn proper English!
Truly you have been brainwashed. Anyone criticizing Open Source does so because:
But, my real question for YOU is, did you just get up on the wrong side of the bed today? Your lover refuse to have sex with you? Or are you paid by Microsoft/Oracle/whatever to bash the open source development model every chance you get?
Why can't you accept that Open Source is not perfect? Why can't you learn not to respond to trolls? Foolish child.
They mention LIDS (Linux Intrustion Detection System).
My question is..
does the LIDS actually do *any* intrustion detection, or does it just prevent modification of certain files?
AIX's VMM assumes way to much about the underlying arch of the machine its running on. Combine that with the fact that it doesn't have a hardware abstraction layer and large pieces of the VMM drops to assembly. The result is something that would be absolutly useless for linux other than maybe as a case study of how not to write a VMM.
Wrong. The problem is that Java (at least pre-1.4) is unusable for serious network programming due to its stupid one (or two, depending on the situation) threads per connection model.
There is a reason that professional Java software like BEA weblogic and Websphere use JNI networking layers written in C instead of the brain-dead java.io/java.net APIs.
The linux kernel's threading support is optimized for software not written by absolute morons: software that has roughly the same order of threads as CPUs.
Get a language that doesn't suck (even if that language is Java 1.4, I have no favorites here), and stop whining because other people won't make well written software run more slowly to help out your broken software.
My father kept all his old Bytes from the late 70s and early 80s... I used to spend my afternoons going through them, one by one, reading the technical details and discussions...
... items that were absent when the paper publication finally stopped a few years ago.
That article is exactly the kind of thing that would have fit right in with the old Byte. I hope they continue such things in the future.
Hey,
I'm a newbie to linux kernels, and I dont understand a lot of the termonology flying around. I.E. What is a spinlock? What's the difference between a dirty page and a clean page? What is a page? Anyhoo, is there a page that explains some kernel terminology and maybe gives a conceptual map of it?
Thanks-
Buck
-Bucky
So why doesn't Linux just copy BSD?
The code here seems rather incidental, it's the design that is more important. But why not copy a good design? Or do one (or both) of the contending VMs do so?
I'm posting this from a 5 year old Toshiba laptop: P120/32Meg RAM ( 64Meg swap indeed) running Linux. It does everything I need, and I just don't see a reason replacing the machine. Linux saved one of two years of extra lifetime for that machine, and I saved some cash
Strangely enough a lot of people tell me to buy a new one because it is "obsolete"....those are Windows users, yup, no kidding. Obsolete? I can play MP3's while working (okay, I admit, in mono...)
I didn't even consider trying OpenOffice on this machine....now thanks to your post, I'll give it a shot! I really start to wonder why I bought a huge desktop machine. Besides, that one has 768Meg RAM and Windows 2000 still uses swapspace. I don't know why: it has more than enough memory available. It probably just swaps out some unused DLL's.
Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
Actually, it's because I did get up on the wrong side of the bed today, and felt like being pissed off about something. That comment struck me as a something.
I am aware the open source development model isn't perfect, but I am also aware that neither is any commercial development model-- portraying as such (either expressed or implied) is a lie, and that is what I was responding to, not the trolling aspect.
Though you can fault me for a little flamebait, you cannot fault me for anything else. I didn't try to portray the open source development model as perfect, I merely pointed out that commercial devlopment processes have the same flaws.
"Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
I am not a kernel hacker, but I make heavy use of many of my system's resources. My target systems have a least 2 Processors, 2GB of RAM, the lastet NVIDIA GPU and fast SCSI disks, and I try to render 3D scenes fast, utilizing every processor, using a lot of IPC, while asynchronously loading hundreds of megabytes per minute from disks and the network.
However, everything I program runs outside the kernel, as a user mode process, and my understanding of one of the main tasks of the kernel is to isolate (misbehaving) user processes, but it seems to me it was never so easy to take out my LINUX-boxes as it with the current 2.4.x kernel series; my app runs fine for days, but after I quit it there is a 50/50 chance the system survives. I get kernel oopses or the system freezes completely; sometimes just the X-Server hangs; when the system continous to operate, sometime the gcc freaks out with internal compiler errors, which disappear after reboot. And I had to switch from Reiserfs to ext2 because of serious filesytem corruptions, and NFS is even more troublesome than usual under LINUX My system logs are full of kernel messages like:
Sep 25 15:02:21 dellomat kernel: Unable to handle kernel paging request at virtual address 002200dc
Sep 25 15:02:21 dellomat kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000
Oct 30 18:13:38 dellomat kernel: kernel BUG at page_alloc.c:81!
Call Trace: [__delete_from_swap_cache+126/132] [__free_pages+27/28] [delete_from_swap_cache_nolock+106/108] [free_page_and_swap_cache+115/196]
I am not absolutely sure I can blame the kernel, but I can rule out the hardware, as the problems appear on at least five different platform on a about ten systems. And the severity of these problems varies with kernel versions; the most stable we currently use is 2.4.8, and 2.4.12 was almost unusable for us. Before reading the article, my favorite suspect for causing these problems were the NVIDIA drivers, but now everything points to some vital parts of the kernel causing these problems. I do really appreciate the great work many people are doing on the kernel, and I think I can't criticise someone for doing me a favour by working on a free OS, but I am really concerned that all this might seriously endanger the only alternative OS that runs one a broad range of state-of-the-art hardware.
I hope that there are not too much people having the same trouble, and I will get rid of these problems without becoming a kernel hacker.
While writing this I became aware of the "Linux Test Project", and I am going to download and run a bunch of tests now; I never thought this would be necessary as I do not do kernel development, but is seems to be the best thing I can do towards getting rid of the problems. (Except whining on slashdot, of course ;-)
p.
Without order, nothing can exist. Without chaos, nothing can be created.
You can't avoid overcommit in a usable system.
This is absolute BS. Most OS's don't allow overcommit. Linux is one of the few that does. Basically what this means is that Linux allows an application (or the total system workingset) to exceed the amount of ram+pagefile available. This is completely unacceptable. When an application comes up and asks for memory that is being consumed it should have its memory allocation fail. That is why malloc has the option to return NULL. If it returns NULL then the current application has to deal with it. If it cannot continue then it needs to write to a log and exit. Otherwise the kernel is forced to choose (very ungracefully) what process gets killed when it is unable to find space to swap a page out to get the required page into memory. This is VERY BAD!!!. Sometimes the only pages in RAM are critical to the operating system. Say for instance only kernel pages and pages for init are in memory. Now which do you kill? Hmmm pretty bad hu? Its not a solvable problem. This is why it should be avoided. This discussion has come up in the past but the base kernel developers always say something like "well at that point your system is pretty much screwed up already". Duh! but its not a fatal system reboot. The system that isn't overcommited can unwedge itself with proper scheduling and memory management given enough time, Linux has to reboot. Ever see W2k pop up a dialog that says "Running low on memory increasing page file size"? Thats not because the machine is 'low' on memory. In fact the whole working set may still fit in memory. What that means is that an application just asked for more RAM than will fit into the pagefile if the OS needed to swap it completly out.
VM isn't just "virtual memory". It is the entire memory management system for processes. So, if you want to have more than one process running at a given time, you need it. what you and your friends did is not 'disable VM' but rather 'disable swap' which are easily confused. Disabling swap may be a good idea, but turning off VM will give you DOS, which is a BAD idea.
Okay, I was shooting for funny, but whatever works. :)
Who swaps these days, anyway? :)
- undoware.ca
Since linus is obviously more open to sudden changes in codebases divisible by two than he used to be, I think the obvious next step is to rewrite the kernel in C# as a
I mean, I know IE has some sort of swapping system... my disk grinds every time it starts up....
- undoware.ca
In the past you probably needed a relative swap/ram ratio. Not, it really depends on the case.
If you usually "touch" the swap partitions you can do well with 120mb swap. If you run a big webserver then you need a lot of swap just in case (it can't hurt). If you reach the post where it's not uncommon to need that load of swap, then you need more ram!
In the end, how big your swap must be depends on what you are using the machine for. On a 1 GB Linux system for desktop use you can leave it with NO swap at all.
--
unfinished: (adj.)
So? That's life not Open Source. That can happen in your family, your company and can happen to Bill Gates. Or do you think they never lose leaders who know well what they do?
Also, this has happened before for Linux for example in the TCP/IP stack where Linus had to choose and the other guy would fade...
The important thing to keep in mind is that Linus / Alan / Whoever need to choose what's best for the Kernel now while not compomising the kernel's future.
--
unfinished: (adj.)
Since the issue has been brought up. How do all the other "Unices" impliment their VM? And how does that compare/contrast to Linuxes?
I've been reading through the current threads concerning the "VM", and the different sides of the coin concerning Alans "VM" opposed to Ricks.It suddenly dawned on me that both have put forward commendable work as was mentioned and are doing a great job, but as the saying goes "two heads are better than one" and exactly that! I think that if these two guys got together and formed a joint project drawing equally on each others positive aspects and combined "ideas" Then we would have a project worth writing home about.
I have tried almost all kernel versions from 2.2.13 till 2.4.14-pre5aa1 including ac series. When I switched from 2.2 series to 2.4 I have got perception that my system became slower, not to mention that 2.4 VM put every process to swap, using RAM mostly for buffers and cache (e.g., when switching to different WindowMaker workspace you see that xterms on that workspace already got swapped with no reason, i.e. at no memory shortage). And now it seems like those good days of 2.2 perfomance is coming back. Maybe it is not perfect yet, but it is really getting there. It is again possible to run system without swap if you have enough RAM.
If you implement a VM that way, launching a program takes a very long time. You could, in theory, start out with nothing in memory and page-fault the program in. This requires one disk access per active memory page until enough is loaded for the program to run. The very first virtual memory system, for the Burroughs 5500, worked that way. It worked OK for batch programs, in an era when batch programs ran for minutes or hours, but was terrible for interactive work.
Most operating systems today load most or all of a program at startup, let the app run for a while, then release the unreferenced pages. Deciding how much to load at startup is an interesting question. The BSD UNIX guess was the first N bytes of the executable, where N is a system tuning parameter. (What, exactly, does Linux do about this?) This is a mediocre guess, but an easy one to make. It's OK for long-running programs, but terrible for short-lived ones. Short-lived programs don't run long enough for the least-recently-used page info to become useful. If paging occurs in this situation, the pages removed are ill-chosen, since the LRU info isn't useful until the program has run for a while.
Much of the memory-demanding things servers do look like short-lived programs. CGI programs and Java servlets are short-lived programs. So they're a bad case for a VM environment. If memory gets tight enough that short-lived programs get paged out, thrashing is almost inevitable.
You don't want to page out at all on a server, except (maybe) under transient overload. As soon as paging activity starts, it's time to throttle back the amount of server concurrency until paging stops. This requires coordination between OS and application of a kind not usually seen in the UNIX world, though mainframe transaction systems have had it for decades, all the way back to CICS.
Desktop systems have a different set of issues, but they don't look like classic time-sharing systems either. My main point here is that in the last decade, the memory usage behavior for most programs has changed considerably, but we're still using virtual memory concepts that were developed in the 1960 and mature by 1980.
And remember, even when everything works right, you get the effect of at best 2X the memory.
Here's a basic tutorial on VM, with emphasis on Linux.
With a few tweeks, an inferior techmology can be faster than a better written system. The fact that some select video games may run faster in Win98 than Linux does not make Win98 supperior. It could be either VM system that will work better in the future. I would hate for people to choose the (Only Currently) faster technology that may not be the best....
Why don't you just boot different kernels if you want to try stuff out?
Especially if you are just testing the VMs out, the other stuff shouldn't affect your tests much.
Because Linux and some other O/Ses don't handle out of memory situations well.
To me it's better to have a gradual degradation of performance as memory runs out, than to run straight into a brickwall, wheels spinning at 133MHz and have Linux kill the wrong process or deadlock.
Another thing about your proposal: if all of the app has to be in then how do you propose to handle process forking?
Cheerio,
Link.
/proc/sys/vm/overcommit_memory=0
certainly doesn't prevent the overcommit. If it worked, this issue wouldn't come up regularly.
Personally, I want to disable overcommit. Disk is relatively cheap and I have no problem with adding 1gig of swap.
And it wouldn't decrease the efficiency at all.
Good. I didn't realize it could send mail when these things are attempted. That makes it okay in my books then.
I just thought it was funny to always hear about this 'intrustion detection system' that didn't actually detect anything.