[j-nsp] Multi Core on JUNOS?

Jesper Skriver jesper at skriver.dk
Sat May 9 04:06:13 EDT 2015


On 09 May 2015, at 10:44, Saku Ytti <saku at ytti.fi> wrote:

> On (2015-05-09 09:40 +0300), Jesper Skriver wrote:
> 
> 
>>>> On (2015-05-08 20:16 +0200), Mark Tinka wrote:
>>>> 
>>>> IOS XE uses multiple cores in the data plane, but now that I think about
>>>> it, I haven't delved into what their strategy for the RP is. I should ask.
>>> 
>>> iosd uses several kernel threads, so RP is using more than one core. But it
>>> looks like it's role-based, and single ios-xr task itself cannot use multiple
>>> core.
>> 
>> Not true, FIB on XR for example is multithreaded, so are some other processes.
> 
> I battled with myself should I repost and fix the mistype, but decided there
> was enough context (Mark explicitly stating so, and iosd) to determine I meant
> IOS-XE, but I clearly I made a mistake.
> 
> So iosd, if you look in ios-xe linux shell it has multiple threads, but their
> cpu time is significantly different, implying ios tasks themselves are not
> actually threaded, rather the 'ios vm' has few processes, which are exposed to
> linux as threads. If I'd venture a quess, one thread does all ios tasks, one
> threads does punt injection, one does clocking. But these are just guesses.

IOS-XE is a different beast, it runs iosd, which is very close to IOS-classic as a process, within iosd one thread runs the IOS classic scheduler which runs all the IOS-classic “processes”/tasks.

As you note, iosd does have other threads, one of which is the “fast path” software forwarding aka punt path, that is mostly unused on XE as all packet forwarding is done by an underlying HW forwarding plane. In addition to that iosd has a few other threads.

Outside iosd, IOS-XE has other processes which handle various things, some features like 802.1x etc are handled by these processes and doesn’t involve iosd much (or not at all). Other processes handle programming of HW, they are fed data from iosd, but the actual programming is done other processes, which can use other cores.

So IOS-XE can and does take advantage of multiple cores, however IOS-classic processes like BGP for example runs within iosd’s single thread for IOS-classic processes.

That said, in practice IOS-XE performance for things like BGP is quite respectable despite them being effectively single threaded.

/Jesper



More information about the juniper-nsp mailing list