子队列对象

队列模块由一组子队列构成,每个子队列都可以保存一个数据包列表。这一结构为实现队列管理算法的进程提供了一种便捷的机制,使其能够按照优先级或类型等各种标准区分数据包。对于拥有 n 个子队列的队列模块,这些子队列被命名为“subqueue [0]”到“subqueue [n]-1]”。子队列由队列模块内的进程通过内核过程进行操作。对子队列执行的基本操作包括插入和移除数据包,以及排序。

有关子队列的更多信息,参见节点参考。

子队列对象属性

下表列出子队列对象的内置属性。

表 27:子队列对象内置属性

Name Data Type
bit capacity double
pk capacity double

子队列对象统计量

下表列出子队列对象可用的统计量。

表 28:子队列对象统计量

Name Units
queue size (bits) bits
queuing delay seconds
free size (bits) bits
free size (packets) packets
queue size (incoming bits) bits
queue size (incoming packets) packets
overflows N/A
queue size (packets) packets

下表列出会更新子队列所指示的统计量的事件。

表 29:子队列对象统计量事件

Event Statistics Updated
packet insertion queue size (bits), free size (bits), free size (packets), queue size (incoming bits), queue size (incoming packets), overflows, queue size (packets)
packet removal (or queue flushing) queue size (bits), queuing delay, free size (bits), free size (packets), queue size (packets)

以下各段描述子队列对象的每个统计量。初始值为“undef”表示该统计量最初未定义。初始值视具体情况而定。

queue size (bits)

该统计量表示子队列中当前存储的比特数。每次数据包插入或移除时,或者队列被清空时,都会生成一个新的 queue size (bits) 样本。插入与移除分别发生在调用内核过程 op_subq_pk_insert() 和 op_subq_pk_remove() 时。

Units bits
Initial Value 0.0

queuing delay

该统计量表示数据包的子队列时延。它的计算方法是用数据包被移除时的仿真时间减去该数据包的到达时间。每次从子队列中移除一个数据包时,都会生成新的时延样本。

Units seconds
Initial Value undef

free size (bits)

该统计量表示以比特计的子队列可用空间。这是不会造成溢出时可以加入子队列的最大比特数。它的计算方法是用子队列的比特容量减去 queue size (bits)。

Units bits
Initial Value cap size

free size (packets)

该统计量表示以数据包计的子队列可用空间。这是不会造成溢出时可以加入子队列的数据包数。它的计算方法是用子队列的数据包容量减去 queue size (packets)。

Units packets
Initial Value cap

queue size (incoming bits)

该统计量表示数据包到达队列时的当前子队列大小(以比特计)。插入发生在调用内核过程 op_subq_pk_insert() 时。

Units bits
Initial Value undef

queue size (incoming packets)

该统计量表示数据包到达队列时的当前子队列大小(以数据包计)。插入发生在调用内核过程 op_subq_pk_insert() 时。

Units packets
Initial Value undef

overflows

该统计量表示子队列因容量不足而不得不拒绝数据包插入的累计次数。overflows 单调递增,并在每次数据包插入失败时更新。子队列的进程模型可以通过将内核过程 op_subq_pk_insert() 的返回值与符号常量 OPC_QINS_FAIL 进行比较,来检测插入失败。

Units not applicable
Initial Value 0.0

queue size (packets)

该统计量表示子队列中当前存储的数据包数。每次数据包插入或移除时,都会生成一个新的 queue size (packets) 样本。插入与移除分别发生在调用内核过程 op_subq_pk_insert() 和 op_subq_pk_remove() 时。

Units packets
Initial Value 0.0

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com