From owner-freebsd-current Sun Apr 11 16:17: 5 1999 Delivered-To: freebsd-current@freebsd.org Received: from home.dragondata.com (home.dragondata.com [204.137.237.2]) by hub.freebsd.org (Postfix) with ESMTP id BF3CF17496 for ; Sun, 11 Apr 1999 15:49:59 -0700 (PDT) (envelope-from toasty@home.dragondata.com) Received: (from toasty@localhost) by home.dragondata.com (8.9.2/8.9.2) id RAA04823; Sun, 11 Apr 1999 17:47:27 -0500 (CDT) From: Kevin Day Message-Id: <199904112247.RAA04823@home.dragondata.com> Subject: Re: DoS from local users (fwd) In-Reply-To: <199904112100.PAA05104@harmony.village.org> from Warner Losh at "Apr 11, 1999 3: 0:50 pm" To: imp@harmony.village.org (Warner Losh) Date: Sun, 11 Apr 1999 17:47:26 -0500 (CDT) Cc: dillon@apollo.backplane.com, hasty@rah.star-gate.com, dv@dv.ru, green@unixhelp.org, freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In message <199904102057.PAA27724@home.dragondata.com> Kevin Day writes: > : i.e. uid 1001 starts 40 processes eating as much cpu as they can. Then uid > : 1002 starts up one process. Uid 1002's process gets 50% cpu, and uid 1001's > : 40 processes get 50% cpu shared between them. > > I've seen some experimental patches in the past that try to do just > this. However, there are some problems. What if uid 1002's process > does a sleep. Should the 40 processes that 1001 just get 50% of the > cpu? Or should there be other limits. It turns into an interesting > research problem in a hurry. > > Warner > I was thinking essentially just processes in the RUN state get applied to this. If the cpu would otherwise be sitting idle, by all means give it to someone. But, if two users have processes running, just because one user has 50 processes doesn't mean it should get 50x the cpu as one user who has one process running. If a process is in sleep or blocked(select, IO, whatever), it's taken out of consideration for the cpu, and the full cpu is given to those processes that actually have work to do. At least, that's my take on it. I run into this problem daily, and i get enough user complains of "User x has 50 processes running, eating as much cpu as they can, my compile just took 15 minutes". Kevin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message