Re: Jail-Aware Scheduling
Hi all, i have a patch from freebsd 4.x not developed for me, but this is very good for appreciate and or upgrade the patch for versions 5.x 6.x or current. This use sysctl oids to limit memory ram and cpu use. Regards and sorry for my bad english, Roberto Lima. jail_seperation.v7.patch Description: Binary data ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Jail-Aware Scheduling
Hi Chris, On Sunday 11 June 2006 07:51, Chris Jones wrote: Hi, folks --- as some of you might know, FreeBSD has a Summer of Code project to bring resource limits to jails, and one part of that is to permit an administrator to put limits on a jail's CPU usage. That's where I come in: I'm the guy doing the project, and I've been spending the last two weeks coming up to speed on scheduling and the like. What I'd like from freebsd-hackers is the following: - are there any good references on scheduling that you know of which I should read? I've already got Design Implementation of FreeBSD and the Petrou / Milford / Gibson and Waldspurger / Weihl papers on lottery scheduling. For my CS study I picked up Operating System Concepts by Silberschatz, Galvin and Gagne. It has a fairly detailed description of the inner workings of a scheduler and the various algorithms involved, but no actual implementation. - what're your thoughts on making the existing scheduler jail- aware as opposed to writing a sort of 'meta-scheduler' that would schedule between jails, and then delegate to a scheduler per jail (which could be very similar, if not identical, to the existing scheduler)? I've got some very preliminary thoughts on this, but I'd like to hear what you've got to say, as I'm aware that this is rather ... complex. I suppose by limiting the jail CPU usage you mean that jails contending over CPU each get their assigned share. But when the system is idle one jail can get all the CPU it wants. Suppose you could detect wether a certain jail used too much CPU, wouldn't it be possible to lower the priorities of all the processes running inside that jail? And when the jail is behind on it's CPU quota, raise their priorities back to normal. I guess you could implement such a thing by a hook in the scheduler which examines the current CPU usage of each jail, say each second, and takes appropriate action accordingly. Regards, Pieter ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Jail-Aware Scheduling
On Sat, Jun 10, 2006 at 11:51:33PM -0600, Chris Jones wrote: - what're your thoughts on making the existing scheduler jail- aware as opposed to writing a sort of 'meta-scheduler' that would schedule between jails, and then delegate to a scheduler per jail (which could be very similar, if not identical, to the existing scheduler)? I've got some very preliminary thoughts on this, but I'd like to hear what you've got to say, as I'm aware that this is rather ... complex. Take a look at Luigis weighted fair CPU scheduler back from the 4.x days. The link should still be somehwere on his page. Joerg ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Jail-Aware Scheduling
On 11-Jun-06, at 6:50 AM, Pieter de Goeje wrote: For my CS study I picked up Operating System Concepts by Silberschatz, Galvin and Gagne. It has a fairly detailed description of the inner workings of a scheduler and the various algorithms involved, but no actual implementation. Yep, we used the Dinosaur Book and I've still got it. I may even have Tanenbaum's OS book kicking around somewhere. - what're your thoughts on making the existing scheduler jail- aware as opposed to writing a sort of 'meta-scheduler' that would schedule between jails, and then delegate to a scheduler per jail (which could be very similar, if not identical, to the existing scheduler)? I've got some very preliminary thoughts on this, but I'd like to hear what you've got to say, as I'm aware that this is rather ... complex. I suppose by limiting the jail CPU usage you mean that jails contending over CPU each get their assigned share. But when the system is idle one jail can get all the CPU it wants. Exactly. Think of it as being like nice-on-steroids, but for a whole jail instead of a process. Suppose you could detect wether a certain jail used too much CPU, wouldn't it be possible to lower the priorities of all the processes running inside that jail? And when the jail is behind on it's CPU quota, raise their priorities back to normal. I guess you could implement such a thing by a hook in the scheduler which examines the current CPU usage of each jail, say each second, and takes appropriate action accordingly. That's one way to do it using one big scheduler; on the other hand, the hierarchical scheduler approach could be as trivial as round- robin timeslicing on the metascheduler between the individual jails' schedulers (obviously, you'd really want at least to be able to do proportional timeslicing and probably to set the schedulers up to hand their timeslice back if they'd otherwise run the idle process). Joerg: thanks for the pointer to Luigi's scheduler; I'll check it out. Cheers, Chris ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Jail-Aware Scheduling
В Вск, 11.06.2006, в 08:51, Chris Jones пишет: Hi, folks --- as some of you might know, FreeBSD has a Summer of Code project to bring resource limits to jails, and one part of that is to permit an administrator to put limits on a jail's CPU usage. That's where I come in: I'm the guy doing the project, and I've been spending the last two weeks coming up to speed on scheduling and the like. What I'd like from freebsd-hackers is the following: - are there any good references on scheduling that you know of which I should read? I've already got Design Implementation of FreeBSD and the Petrou / Milford / Gibson and Waldspurger / Weihl papers on lottery scheduling. - what're your thoughts on making the existing scheduler jail- aware as opposed to writing a sort of 'meta-scheduler' that would schedule between jails, and then delegate to a scheduler per jail (which could be very similar, if not identical, to the existing scheduler)? I've got some very preliminary thoughts on this, but I'd like to hear what you've got to say, as I'm aware that this is rather ... complex. Thanks, You are look in FreeBSD 4.x vimage project or linux projects (OpenVZ, FreeVPS, Linux-VServer)? other reference can be 'fair share scheduler' where groups equal jail. -- FreeVPS Developers Team http://www.freevps.com Positive Softwarehttp://www.psoft.net ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Jail-Aware Scheduling
On 11-Jun-06, at 6:50 AM, Pieter de Goeje wrote: For my CS study I picked up Operating System Concepts by Silberschatz, Galvin and Gagne. It has a fairly detailed description of the inner workings of a scheduler and the various algorithms involved, but no actual implementation. Yep, we used the Dinosaur Book and I've still got it. I may even have Tanenbaum's OS book kicking around somewhere. - what're your thoughts on making the existing scheduler jail- aware as opposed to writing a sort of 'meta-scheduler' that would schedule between jails, and then delegate to a scheduler per jail (which could be very similar, if not identical, to the existing scheduler)? I've got some very preliminary thoughts on this, but I'd like to hear what you've got to say, as I'm aware that this is rather ... complex. I suppose by limiting the jail CPU usage you mean that jails contending over CPU each get their assigned share. But when the system is idle one jail can get all the CPU it wants. Exactly. Think of it as being like nice-on-steroids, but for a whole jail instead of a process. Suppose you could detect wether a certain jail used too much CPU, wouldn't it be possible to lower the priorities of all the processes running inside that jail? And when the jail is behind on it's CPU quota, raise their priorities back to normal. I guess you could implement such a thing by a hook in the scheduler which examines the current CPU usage of each jail, say each second, and takes appropriate action accordingly. That's one way to do it using one big scheduler; on the other hand, the hierarchical scheduler approach could be as trivial as round- robin timeslicing on the metascheduler between the individual jails' schedulers (obviously, you'd really want at least to be able to do proportional timeslicing and probably to set the schedulers up to hand their timeslice back if they'd otherwise run the idle process). Joerg: thanks for the pointer to Luigi's scheduler; I'll check it out. Cheers, Chris ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Jail-Aware Scheduling
On Sun, 2006-Jun-11 14:50:30 +0200, Pieter de Goeje wrote: I suppose by limiting the jail CPU usage you mean that jails contending over CPU each get their assigned share. But when the system is idle one jail can get all the CPU it wants. IBM MVS had an interesting alternative approach, which I believe was part of the scheduler: You could place an upper limit on the CPU allocated to a process. From a user perspective, an application would respond in (say) 2 seconds whether the system was completely idle or at normal load. This stopped users complaining that the system was slow as the system got loaded. In the case of jailed systems, it could also prevent (or minimize) traffic analysis of the system by a jailed process. -- Peter Jeremy ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Jail-Aware Scheduling
I personally prefer the notion of layering the normal scheduler on top of a simple fair-share scheduler. This would not add any overhead for the non-jailed case. Complicating the process scheduler poses maintenance, scalability, and general performance problems. -Kip On 6/11/06, Peter Jeremy [EMAIL PROTECTED] wrote: On Sun, 2006-Jun-11 14:50:30 +0200, Pieter de Goeje wrote: I suppose by limiting the jail CPU usage you mean that jails contending over CPU each get their assigned share. But when the system is idle one jail can get all the CPU it wants. IBM MVS had an interesting alternative approach, which I believe was part of the scheduler: You could place an upper limit on the CPU allocated to a process. From a user perspective, an application would respond in (say) 2 seconds whether the system was completely idle or at normal load. This stopped users complaining that the system was slow as the system got loaded. In the case of jailed systems, it could also prevent (or minimize) traffic analysis of the system by a jailed process. -- Peter Jeremy ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Jail-Aware Scheduling
Hi, folks --- as some of you might know, FreeBSD has a Summer of Code project to bring resource limits to jails, and one part of that is to permit an administrator to put limits on a jail's CPU usage. That's where I come in: I'm the guy doing the project, and I've been spending the last two weeks coming up to speed on scheduling and the like. What I'd like from freebsd-hackers is the following: - are there any good references on scheduling that you know of which I should read? I've already got Design Implementation of FreeBSD and the Petrou / Milford / Gibson and Waldspurger / Weihl papers on lottery scheduling. - what're your thoughts on making the existing scheduler jail- aware as opposed to writing a sort of 'meta-scheduler' that would schedule between jails, and then delegate to a scheduler per jail (which could be very similar, if not identical, to the existing scheduler)? I've got some very preliminary thoughts on this, but I'd like to hear what you've got to say, as I'm aware that this is rather ... complex. Thanks, Chris ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]