Re: [Vserver] Re: vs2.0, kernel 2.6.12.5 and util-vserver-*-0.30.208-2mdk.i586.rpm
On Fri, Aug 26, 2005 at 08:29:27PM +0200, Nicolas Costes wrote: > Le mardi 23 Août 2005 14:54, Herbert Poetzl a écrit : > > On Tue, Aug 23, 2005 at 01:25:10PM +0200, Nicolas Costes wrote: > > > Hello, all !!! > > > > > > I've just installed a vs2.0 host with a 2.6.12.5 kernel and > > > util-vserver-*-0.30.208-2mdk.i586.rpm, and it just work fine for > > > the moment. Good job, guys ! > > I now have 3 hosts like this one. Too few vservers on it at the > moment, but it will be more relevant when going full production next > weeks. good, keep us updated ... > > > I noticed that the patch was made against kernel 2.6.12.4, but > > > there is not rejection nor warnings with 2.6.12.5, so that's good. > > > Is it luck ? Is it normal ? > > > no :) > > > > One small thing : The compiled kernel does not mention any > > > extraversion (-vs2.0...) ! So, when using "uname -a", I only get > > > 2.6.12.5 :(. How can I correct this ? (Although it is not that > > > important, huh ;) !) > > > that's the one hunk which _got_ rejected (patching > > the makefile) but you didn't notice :) > > the next release will be for 2.6.12.5 or later ... > > Humm, er... See below ;-) > > > > More info in a couple of days : I'm going to build at least two > > > other hosts. For info, I compiled vs2.0 with distcc (3 machines, 1 > > > PIII and 2 PIV HyperThreading -j{6,7,8}) , and all went fine. > > > > excellent, thanks for the feedback, I really > > appreciate it! > > As said upper, I've now done it for 3 target hosts (PIII 1400, > PIII1113, PIII866), and even when mixing gcc3.3mdk and gcc3.4mdk, It > went fine. I could have tried with gcc-4.0mdk, but I didn't have time > to play with fire ;-) (And the kernel does not compile with 4.0, as I > read) > > Ok, the hard part... > > A litte fun for the week-end : I've ported vs-2.0 for kernel 2.6.12.4 to > kernel 2.6.12.5 ! I'm proud of it, it's my first kernel patch : sorry to disappoint you, but strictly speaking, it's not a kernel patch ... it's a meta patch, patching a kernel patch :) > [nayco@ Vservers]$ ls patch-2.6.12* > patch-2.6.12.4-vs2.0.diff patch-2.6.12.5-vs2.0.diff > > [nayco@ Vservers]$ diff -u patch-2.6.12.4-vs2.0.diff patch-2.6.12.5-vs2.0.diff > --- patch-2.6.12.4-vs2.0.diff 2005-08-26 20:14:26.518105072 +0200 > +++ patch-2.6.12.5-vs2.0.diff 2005-08-26 20:16:03.272279117 +0200 > @@ -115,8 +115,8 @@ > VERSION = 2 > PATCHLEVEL = 6 > SUBLEVEL = 12 > --EXTRAVERSION = .4 > -+EXTRAVERSION = .4-vs2.0 > +-EXTRAVERSION = .5 > ++EXTRAVERSION = .5-vs2.0 > NAME=Woozy Numbat > > # *DOCUMENTATION* > [nayco@ Vservers]$ > > First patch, huh ? Well, er, my last. lol best, Herbert > -- > hep > quelle dif entre dns et ip ? > > - #linuxfr > ___ > Vserver mailing list > Vserver@list.linux-vserver.org > http://list.linux-vserver.org/mailman/listinfo/vserver ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
[Vserver] Re: vs2.0, kernel 2.6.12.5 and util-vserver-*-0.30.208-2mdk.i586.rpm
Le mardi 23 Août 2005 14:54, Herbert Poetzl a écrit : > On Tue, Aug 23, 2005 at 01:25:10PM +0200, Nicolas Costes wrote: > > Hello, all !!! > > > > I've just installed a vs2.0 host with a 2.6.12.5 kernel and > > util-vserver-*-0.30.208-2mdk.i586.rpm, and it just work fine for the > > moment. Good job, guys ! I now have 3 hosts like this one. Too few vservers on it at the moment, but it will be more relevant when going full production next weeks. > > I noticed that the patch was made against kernel 2.6.12.4, but there is > > not rejection nor warnings with 2.6.12.5, so that's good. Is it luck ? Is > > it normal ? > no :) > > One small thing : The compiled kernel does not mention any extraversion > > (-vs2.0...) ! So, when using "uname -a", I only get 2.6.12.5 :(. How can > > I correct this ? (Although it is not that important, huh ;) !) > that's the one hunk which _got_ rejected (patching > the makefile) but you didn't notice :) > the next release will be for 2.6.12.5 or later ... Humm, er... See below ;-) > > More info in a couple of days : I'm going to build at least two other > > hosts. For info, I compiled vs2.0 with distcc (3 machines, 1 PIII and 2 > > PIV HyperThreading -j{6,7,8}) , and all went fine. > > excellent, thanks for the feedback, I really > appreciate it! As said upper, I've now done it for 3 target hosts (PIII 1400, PIII1113, PIII866), and even when mixing gcc3.3mdk and gcc3.4mdk, It went fine. I could have tried with gcc-4.0mdk, but I didn't have time to play with fire ;-) (And the kernel does not compile with 4.0, as I read) Ok, the hard part... A litte fun for the week-end : I've ported vs-2.0 for kernel 2.6.12.4 to kernel 2.6.12.5 ! I'm proud of it, it's my first kernel patch : [nayco@ Vservers]$ ls patch-2.6.12* patch-2.6.12.4-vs2.0.diff patch-2.6.12.5-vs2.0.diff [nayco@ Vservers]$ diff -u patch-2.6.12.4-vs2.0.diff patch-2.6.12.5-vs2.0.diff --- patch-2.6.12.4-vs2.0.diff 2005-08-26 20:14:26.518105072 +0200 +++ patch-2.6.12.5-vs2.0.diff 2005-08-26 20:16:03.272279117 +0200 @@ -115,8 +115,8 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 12 --EXTRAVERSION = .4 -+EXTRAVERSION = .4-vs2.0 +-EXTRAVERSION = .5 ++EXTRAVERSION = .5-vs2.0 NAME=Woozy Numbat # *DOCUMENTATION* [nayco@ Vservers]$ First patch, huh ? Well, er, my last. -- hep quelle dif entre dns et ip ? - #linuxfr pgpJpmOZNEX2F.pgp Description: PGP signature ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] RHEL-4.0
Hi there, on Freitag, 26. August 2005 at 09:40 on the list was posted: > Is it possible to backport vserver 2.0 patch to kernel 2.6.9 ? (RHEL > 4.0 default) Not reverting Herbert's reply I would suggest not to use the RHEL supplied kernel(s) at all. Reason? RTFdocs: http://linux-vserver.org/FedoraCore3_HowTo -- regards, Guenther Fuchs ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] RHEL-4.0
On Fri, Aug 26, 2005 at 09:40:00AM +0200, Matvey Gladkikh wrote: > Is it possible to backport vserver 2.0 patch to kernel 2.6.9? > (RHEL 4.0 default) I guess so, do you want to finance such a backport? best, Herbert > Cheers, > Matvey > -- > ?? ??, > ?? > ?? "-??" > ??. , . ?? ??, 9, . 803 > ??./ (095) 981-60-42 > ___ > Vserver mailing list > Vserver@list.linux-vserver.org > http://list.linux-vserver.org/mailman/listinfo/vserver ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] rlimit for memory usage
On Fri, 26 Aug 2005, Helmut Wollmersdorfer wrote: > Oliver Welter wrote: > My plan was, to give this context 20% CPU 'soft' (400 x 20% = 100 MHz), > 128 MB RSS rlimit, and 500 MB VM rlimit. But if OOM can kill some vital > processes, this would need watching the services and restart them by > heartbeat. You should take a look at /proc/$PID/oom_score and /proc/$PID/oom_adj to make them a worse target and use runit for critical services. -- Top 100 things you don't want the sysadmin to say: 59. Wonder what *this* command does? ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] rlimit for memory usage
On Fri, 2005-08-26 at 13:32 +0200, Helmut Wollmersdorfer wrote: [...] > 128 MB RSS rlimit, and 500 MB VM rlimit. But if OOM can kill some vital > processes, this would need watching the services and restart them by > heartbeat. You basically have to do it anyway since it bahaves the same without vserver. And AFAIK there is no concept or what-ever of "important" vs. "unimportant" process when it comes to kill one. Bernd -- Firmix Software GmbH http://www.firmix.at/ mobil: +43 664 4416156 fax: +43 1 7890849-55 Embedded Linux Development and Services ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] rlimit for memory usage
Oliver Welter wrote: What means 'killed off'? Naively I assumed, that if e.g. current RSS of the context is 52 MB and something (e.g. start of a Java application) tries to get 42 MB, some pages must be 'kicked out' of real memory to fullfill the 64 MB limit, resulting in bad performance, but not 'killed'. In this case it is likely that simply your new process wont start, you get in real problems if you run into rss limit for an already running process: A process P tells the kernel to reserve e.g 40 MB of RAM but instantly only needs 20 MB, now you fill up the remaining 44 MB of physikal RAM with other process. When now the R want's the already reserved space there is nothing you can give him. Now eiter P terminates because it cant allocate the mem it needs or the OOM Killer process tries to sweep out processes from the RAM. It is very likely that it will kill some currently idle processes that are essential for your system(I had this last week when OOM killed my mysql and silently my sshd...) Hmm ... At the moment I try to consolidate a Webserver (real hardware) with 128 MB, Pentium 100, as a vserver into my HA-Cluster (2x 512 MB, 400 Mhz). One of the reasons to choose vserver is, to give the admin of this server root permissions within his context, and second to restrict the resources. The current P100 server runs some bad wikis, using Java, which is very greedy on memory. Thus the performance is bad because of ~80 MB swap used, slow disks. My plan was, to give this context 20% CPU 'soft' (400 x 20% = 100 MHz), 128 MB RSS rlimit, and 500 MB VM rlimit. But if OOM can kill some vital processes, this would need watching the services and restart them by heartbeat. Other possibility would be, to give this service more resources on the secondary node of the cluster, and restrict (reconfigure) the rlimits in case of failover to the primary node (where my preferred services are running). Needs scripting and testing;-) Helmut Wollmersdorfer ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] Re: rlimit for memory usage
On Friday 26 August 2005 09:36, Matvey Gladkikh wrote: > On 22/08/05 14:59 +0200, Herbert Poetzl wrote: > > > > I don't know about rlimits/ directory, but for vlimit it can look > > > > like: vlimit --xid X --data 1572864 > > > > > > Is there a way to limit each vserver's maximum memory usage to 64 MB? > > This instruction should be issued each time guest boots up? No, you can normally write the rlimit in file etc/vservers//rlimits/.hard Cf flower page http://www.nongnu.org/util-vserver/doc/conf/configuration.html But the "data" limit per context doesn't seem available right now http://linux-vserver.org/Resource+Limits (no "R" in Code column) From my tests, you can use "--rss" (file "rss.hard") or "--as" (file "as.hard"). For your purpose, perhaps "as" (address space, or virtual memory) is what you want ? -- Xavier Montagutelli Service Commun Informatique Universite de Limoges Tel : +33 555457720 Cle GPG : http://pgp.mit.edu 1024D/175CE198 ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] rlimit for memory usage
Hi Helmut, well, you can certainly do that, and I guess most apps will handle that perfectly well, unfortunately there are certain apps which tend to allocate huge amounts of virtual memory, just in case they'll need it later on, and those will be really suprised, once they reach the RSS limit and get killed off by the OOM killer. What means 'killed off'? Naively I assumed, that if e.g. current RSS of the context is 52 MB and something (e.g. start of a Java application) tries to get 42 MB, some pages must be 'kicked out' of real memory to fullfill the 64 MB limit, resulting in bad performance, but not 'killed'. In this case it is likely that simply your new process wont start, you get in real problems if you run into rss limit for an already running process: A process P tells the kernel to reserve e.g 40 MB of RAM but instantly only needs 20 MB, now you fill up the remaining 44 MB of physikal RAM with other process. When now the R want's the already reserved space there is nothing you can give him. Now eiter P terminates because it cant allocate the mem it needs or the OOM Killer process tries to sweep out processes from the RAM. It is very likely that it will kill some currently idle processes that are essential for your system(I had this last week when OOM killed my mysql and silently my sshd...) Oliver -- Diese Nachricht wurde digital unterschrieben oliwel's public key: http://www.oliwel.de/oliwel.crt Basiszertifikat: http://www.ldv.ei.tum.de/page72 smime.p7s Description: S/MIME Cryptographic Signature ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Re: [Vserver] rlimit for memory usage
Herbert Poetzl wrote: so why not simply set RSS to 64MB and be done? well, you can certainly do that, and I guess most apps will handle that perfectly well, unfortunately there are certain apps which tend to allocate huge amounts of virtual memory, just in case they'll need it later on, and those will be really suprised, once they reach the RSS limit and get killed off by the OOM killer. What means 'killed off'? Naively I assumed, that if e.g. current RSS of the context is 52 MB and something (e.g. start of a Java application) tries to get 42 MB, some pages must be 'kicked out' of real memory to fullfill the 64 MB limit, resulting in bad performance, but not 'killed'. Helmut Wollmersdorfer ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
[Vserver] RHEL-4.0
Is it possible to backport vserver 2.0 patch to kernel 2.6.9 ? (RHEL 4.0 default) Cheers, Matvey -- С уважением, Матвей Гладких ООО "Скай-Медиа" г. Москва, ул. Сущевский вал, 9, оф. 803 Тел./факс (095) 981-60-42 ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
[Vserver] Re: rlimit for memory usage
On 22/08/05 14:59 +0200, Herbert Poetzl wrote: > > > I don't know about rlimits/ directory, but for vlimit it can look like: > > > vlimit --xid X --data 1572864 > > > > Is there a way to limit each vserver's maximum memory usage to 64 MB? This instruction should be issued each time guest boots up? -- С уважением, Матвей Гладких ООО "Скай-Медиа" г. Москва, ул. Сущевский вал, 9, оф. 803 Тел./факс (095) 981-60-42 ___ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver