Documentation_cgroups_net_prio

Chinese translated version of Documentation/pcmcia/devicetable




If you have any comment or update to the content, please contact the
original document maintainer directly.  However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help.  Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.




Chinese maintainer:  530999000@qq.com
---------------------------------------------------------------------
Documentation/pcmcia/devicetable的中文翻译








如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。




中文版维护者: 王明达   530999000@qq.com
中文版翻译者: 王明达   530999000@qq.com
中文版校译者: 王明达   530999000@qq.com








以下为正文
---------------------------------------------------------------------


Network priority cgroup


网络优先级cgroup
-------------------------


The Network priority cgroup provides an interface to allow an administrator to
dynamically set the priority of network traffic generated by various
applications


网络优先级cgroup中提供了一个接口,允许管理员动态设置所产生的各种网络流量的优先级
应用程序


Nominally, an application would set the priority of its traffic via the
SO_PRIORITY socket option.  This however, is not always possible because:


名义上,应用程序会通过SO_PRIORITY套接字选项来设置它的访问流量的优先顺序。然而,这
并不总是可能的,因为:


1) The application may not have been coded to set this value
2) The priority of application traffic is often a site-specific administrative
   decision rather than an application defined one.


1)应用程序可能无法被编码来设置此值
2)应用流量的优先级往往是一个网站的具体行政决定,而不是一个应用程序定义了一个。   
   
This cgroup allows an administrator to assign a process to a group which defines
the priority of egress traffic on a given interface. Network priority groups can
be created by first mounting the cgroup filesystem.


cgroup允许管理员非配一个过程给一个给定的结构定义了出口流量的优先级的组。网络优先级
组可以由第一安装cgroup文件系统来创建。


# mount -t cgroup -onet_prio none /sys/fs/cgroup/net_prio


With the above step, the initial group acting as the parent accounting group
becomes visible at '/sys/fs/cgroup/net_prio'.  This group includes all tasks in
the system. '/sys/fs/cgroup/net_prio/tasks' lists the tasks in this cgroup.


上述步骤,最初的组作为母组在'/sys/fs/cgroup/net_prio'变为可视的。这些组包括系统里的
所有任务。'/sys/fs/cgroup/net_prio/tasks'在cgroup列举了这些任务。


Each net_prio cgroup contains two files that are subsystem specific


每个net_prio cgroup的包含两个子系统特定的文件。


net_prio.prioidx
This file is read-only, and is simply informative.  It contains a unique integer
value that the kernel uses as an internal representation of this cgroup.


这个文件是只读的,而且可以说是翔实的。它包含了一个独特的整数值,内核用其来作为cgroup
的内部表示。


net_prio.ifpriomap
This file contains a map of the priorities assigned to traffic originating from
processes in this group and egressing the system on various interfaces. It
contains a list of tuples in the form <ifname priority>.  Contents of this file
can be modified by echoing a string into the file using the same tuple format.
for example:


此文件包含一个优先分配这个组的过程以及各种接口上的溢出系统的流量。它包含<ifname priority>
里的一系列元组。这个文件的内容可以由字符串转换使用相同的元组格式来修改。


echo "eth0 5" > /sys/fs/cgroups/net_prio/iscsi/net_prio.ifpriomap


This command would force any traffic originating from processes belonging to the
iscsi net_prio cgroup and egressing on interface eth0 to have the priority of
said traffic set to the value 5. The parent accounting group also has a
writeable 'net_prio.ifpriomap' file that can be used to set a system default
priority.


此命令将迫使任何流量属于iSCSI net_prio cgroup和egressing接口eth0的进程的优先级有优先级
来设置traffic的值为5。母计数组也有一个可写的'net_prio.ifpriomap'文件,可以用来设置系统
默认优先级。


Priorities are set immediately prior to queueing a frame to the device
queueing discipline (qdisc) so priorities will be assigned prior to the hardware
queue selection being made.


优先级设置立即排队前一帧的设备队列纪律(队列规定),因此将优先分配到硬件队列做出选择之前。


One usage for the net_prio cgroup is with mqprio qdisc allowing application
traffic to be steered to hardware/driver based traffic classes. These mappings
can then be managed by administrators or other networking protocols such as
DCBX.


cgroup的net_prio的用法之一是允许应用流量引导到基于硬件/驱动程序的交通类mqprio队列规定。这
些映射,然后可以由管理员或其他网络协议如DCBX管理。


A new net_prio cgroup inherits the parent's configuration.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值