Boost logo

Boost Users :

Subject: Re: [Boost-users] Asio and software interrupts
From: Andreas Wehrmann (a.wehrmann_at_[hidden])
Date: 2012-11-29 03:57:13


Hi,

I don't think the softirqs can be avoided, since the network
driver dispatches each packet it receives to the network layer
(which causes a software interrupt).
Now if you listen to 500+ multicast addresses and given the limited
resources available on the embedded platform
(What platform is it actually? And what performance does it offer?)
I would certainly expect a lot of time to be spent simply for handling
the network packets in the kernel.

How did you determine the 51% spent in softirqs?
Did you watch the ksoftirq process?

Regards,

Andreas

On 11/28/2012 10:34 PM, Joseph Sulewski wrote:
> Hello,
>
> I’m use the Boost::Asio libraries to read data from multicast sockets.
> This is a high rate application that needs to listen to data coming on a
> large number of multicast addresses (up to 500 different addresses). I
> would like to funnel all the multicast traffic to a single class where
> the data can get handled very quickly.
>
> I have the code working now using the socket->async_receive_from()
> method but the system is getting bogged down handling a large number of
> software interrupts. 51% of the CPU time is spent handling software
> interrupts.
>
> I create each multicast socket (up to 500 of them) like so:
>
> socket = new udp::socket(io_service);
>
> socket->open(listenEndPoint.protocol());
>
> socket->set_option(boost::asio::ip::udp::socket::resuse_address(true));
>
> socket->bind(listenEndPoint);
>
> socket->set_option(boost::asio::ip::multicast::join_group(multicastAddress.to_v4()));
>
> Slightly after that I register for data like so:
>
> socket->async_receive_from(buffer,senderEndPoint,boost::bind(&EthernetCapture::receiveData,this,boost::asio::placeholders::bytes_transferred));
>
> Is there a more efficient way to receive multicast data without
> incurring so many software interrupts?
>
> By the way this is for an application to run on 32 bit Linux for an
> embedded application.
>
> Thanks
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

-- 
Mit freundlichen Grüßen / Best regards
Andreas Wehrmann
CENTER COMMUNICATION SYSTEMS GMBH
Ein Unternehmen der STRABAG AG
Software Development
Ignaz-Köck-Str. 19
A-1210 Wien, Österreich
Tel.: +43 (0) 190 199 - 3616
Fax: +43 (0) 190 199 - 2110
Mobil: +43 (0) 664 884 75916
a.wehrmann_at_[hidden]
FN 796 88p, Sitz in Wien
Firmenbuchgericht Wien
<http://www.centersystems.com/> www.centersystems.com
Geschäftsführung: Ing. Gerhard Jelinek, Josef-Eduard Burger

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net