在我的Linux系统中,我看到了以下内容:
# ip link list
....
2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
....
qdisc mq是什么?在http://lartc.org/lartc.html中,我只找到有关IMQ的信息。
在指南中的示例中也有qdisc noop和qdisc noqueue,但没有关于它们的详细信息。
问题是,调度器在哪里?
# for f in /sys/block/sd?/queue/scheduler; do printf "$f is "; cat $f; done
/sys/block/sda/queue/scheduler is [mq-deadline] none
/sys/block/sdb/queue/scheduler is [mq-deadline] none
/sys/block/sdc/queue/scheduler is [mq-deadline] none
/sys/block/sdd/queue/scheduler is [mq-deadlin
我有一个系统,里面-
Queue & 2 types of instances -
1.push to the Queue
2.pull from Queue
我想在同一时间推拉队列,但我不确定(我没有在文档中找到,也没有找到实现),队列是否保护了对同一内存访问的冲突
for example:
There is zero elements in the Queue -> I push and then I pull in the same time
我的问题
我一直在寻找FIFO解决方案,其中生产者和消费者可以部署在多个数据中心,在不同的地区(例如>20 be ping)。显然,付出了增加延迟的代价,主要目标是透明地处理增加的延迟、延迟中的尖峰、链路故障。
这个理论用例是这样的:
Super Fast Producer --sticky-load-balancing-with-fail-over--> Multi-Region Processors -->
Queue(FIFO based on order established by the producer) --> Multi-Region Consu
当我阅读一些代码时,我认为事件的使用是不必要的,对吗?
# start server
while True:
# accept a request here
queue.put(info)
event.set() # notify all the threads?
# pass queue and event here to a Thread constructor
其他地方有超过10个线程在运行,
# inside a Thread class
def __init__(self, queue, event):
threading.Thread.__i