mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Andrea Righi <righiandr@users.sourceforge.net>
Cc: Naveen Gupta <ngupta@google.com>, Paul Menage <menage@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	David Miller <davem@davemloft.net>
Subject: Re: [RFC] [PATCH] cgroup: limit network bandwidth
Date: Wed, 23 Jan 2008 14:54:17 +0530	[thread overview]
Message-ID: <20080123092417.GA4542@balbir.in.ibm.com> (raw)
In-Reply-To: <47970448.7010609@users.sourceforge.net>

* Andrea Righi <righiandr@users.sourceforge.net> [2008-01-23 10:09:28]:

> Allow to limit the network bandwidth for specific process containers (cgroups)
> imposing additional delays in the sockets' sendmsg()/recvmsg() calls made by
> those processes that exceed the limits defined in the control group filesystem.
> 
> Example:
>   # mkdir /dev/cgroup
>   # mount -t cgroup -onet net /dev/cgroup
>   # cd /dev/cgroup
>   # mkdir foo
>   --> the cgroup foo has been created
>   # /bin/echo $$ > foo/tasks
>   # /bin/echo 1024 > foo/net.tcp
>   # /bin/echo 2048 > foo/net.tot
>   # sh
>   --> the subshell 'sh' is running in cgroup "foo" that has a maximum network
>       bandwidth for TCP traffic of 1MB/s and 2MB/s for total network
>       activities.
> 
> The netlimit approach can be easily extended to support additional network
> protocols or different socket families or types (PF_UNIX, PF_BLUETOOTH,
> SOCK_SEQPACKET, etc.).
> 
> Signed-off-by: Andrea Righi <a.righi@cineca.it>

Hi, Andrea,

I took a quick look at the patches and it looks like we throttle
network (by forcing a schedule_timeout()), if we exceed our bandwidth
limit. That is one way of doing it, but it has some disadvantages, it
does not scale to 

1. Implementation of soft limits (limit on contention of resource)
   gets harder
2. Why dont use the existing infrastructure for bandwidth limitation
   for implementing the network controller?

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

  reply	other threads:[~2008-01-23  9:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-23  9:09 Andrea Righi
2008-01-23  9:24 ` Balbir Singh [this message]
2008-01-23 16:48   ` Andrea Righi
2008-01-23 16:59     ` Paul Menage
2008-01-23 17:48       ` Andrea Righi
2008-01-23  9:54 ` Paul Menage

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080123092417.GA4542@balbir.in.ibm.com \
    --to=balbir@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=ngupta@google.com \
    --cc=righiandr@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®