[Click] SimpleQueue Performance issue

Eddie Kohler kohler at cs.ucla.edu
Thu Dec 10 20:20:31 EST 2009


I would actually expect a SimpleQueue based configuration to take 
roughly 100% CPU in ALL situations, whether or not there are lots of 
packets in the queue.

For instance:

click -e "TimedSource(1000 /* 1 packet every 1000s */) -> SimpleQueue -> 
Discard"

takes 100% of the CPU.

You should almost certainly be modifying something like NotifierQueue or 
FullNoteQueue, because you want the notification support.  But why are 
you modifying the Queue at all?  I would instead implement the 
modification element as separate from the queue.

In fact you can cobble togehter this functionality from elements that 
already exist, including RED and MarkIPCE.

Let's say you wanted to set CE if the queue has more than 100 packets in 
it.  Then try:

  ... -> mark_decision :: RED(100, 100, 1, QUEUES q, STABILITY 1)
      -> q :: Queue -> ...
  mark_decision [1] -> MarkIPCE -> q;

Note that this will only work if the packets have ECN Capable Transport 
set; otherwise MarkIPCE will drop them.  If you update to the latest 
code, however, MarkIPCE(FORCE true) will set CE even on non-ECN Capable 
packets.

Eddie


remi.clavier at orange-ftgroup.com wrote:
>  
> I have not anderstant exactly how Simple Queue works.
> For a specific use, I patch SimpleQueue to add an annotation when the
> length is greather tha a given value using the packet->uniqueify()
> function to have a new packet to annotate .When the ModifiedQueue is
> empty, nothing special happends.
> 
> But when the Queue contains Packets, the CPU usage grows very quickly
> and go to 100% when the numbre of packets in the queue becomes higher;
> When the Queue becomes empty, the CPU usage decrease slowly to a normal
> value
> 
> I's a normal behavior for a Simple Queue or is this problem related to
> my patch?
> 
> 
> I use click 1.7 with multithread option.
> 
> Help will be welcome
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list