All of lore.kernel.org
 help / color / mirror / Atom feed
* DPDK testpmd, Virtual Disk IO limitation
@ 2015-03-25 14:06 Cheng Kevin
       [not found] ` <CACnuE8Fynh9PNekD5jLamTfnzp1E-9r11MwnLqP_u+n8wdE22Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Cheng Kevin @ 2015-03-25 14:06 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

Hi all,

   I am a beginner of DPDK. Recently, i am interest in DPDK vHost app -
testpmd.

   And i have been tracing on testpmd.c and iofwd.c for a while.

   Also add some code inside iofwd.c for storing the payload of packets.

   Everything goes fine, and the performance is great as expected.

   But when i use fwrite to store the payload into a file,

   the performance decrease from 800mbps to 3mbps (input stream is 1 Gbps).

   Is is caused by the limitation of Virtual Disk IO? How can i solve it?

   I have tried to search the answer, some people say "pthread" might solve
the problem.

   Can someone give me some hint, i really appreciate for your help.


Best Regard,

Kevin Cheng

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DPDK testpmd, Virtual Disk IO limitation
       [not found] ` <CACnuE8Fynh9PNekD5jLamTfnzp1E-9r11MwnLqP_u+n8wdE22Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-03-25 15:01   ` Bruce Richardson
  2015-03-25 16:20     ` Cheng Kevin
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2015-03-25 15:01 UTC (permalink / raw)
  To: Cheng Kevin; +Cc: dev-VfR2kkLFssw

On Wed, Mar 25, 2015 at 10:06:48PM +0800, Cheng Kevin wrote:
> Hi all,
> 
>    I am a beginner of DPDK. Recently, i am interest in DPDK vHost app -
> testpmd.
> 
>    And i have been tracing on testpmd.c and iofwd.c for a while.
> 
>    Also add some code inside iofwd.c for storing the payload of packets.
> 
>    Everything goes fine, and the performance is great as expected.
> 
>    But when i use fwrite to store the payload into a file,
> 
>    the performance decrease from 800mbps to 3mbps (input stream is 1 Gbps).
> 
>    Is is caused by the limitation of Virtual Disk IO? How can i solve it?
> 
>    I have tried to search the answer, some people say "pthread" might solve
> the problem.
> 
>    Can someone give me some hint, i really appreciate for your help.
> 
> 
> Best Regard,
> 
> Kevin Cheng

Two general issues you will hit writing to disk:
1) IO, including disk IO, is slow
2) System calls are slow.

You are probably hitting both bottlenecks.

/Bruce

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DPDK testpmd, Virtual Disk IO limitation
  2015-03-25 15:01   ` Bruce Richardson
@ 2015-03-25 16:20     ` Cheng Kevin
       [not found]       ` <CACnuE8GYK2E4LELuCsAdRChWViOY6jYLBYXA9AdGd4Bn9u8ZHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Cheng Kevin @ 2015-03-25 16:20 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev-VfR2kkLFssw

Mr. Bruce Richardson

Yes, you are right. This really bother me.

Is there any way to get rid of system call? Maybe some DPDK threading API?
Maybe i should use a extra nic card for posting the data out through
internet, instead of writing on the disk - ex. fwrite.

Or you have some better advises??

Thanks
Kevin


2015-03-25 23:01 GMT+08:00 Bruce Richardson <bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>:

> On Wed, Mar 25, 2015 at 10:06:48PM +0800, Cheng Kevin wrote:
> > Hi all,
> >
> >    I am a beginner of DPDK. Recently, i am interest in DPDK vHost app -
> > testpmd.
> >
> >    And i have been tracing on testpmd.c and iofwd.c for a while.
> >
> >    Also add some code inside iofwd.c for storing the payload of packets.
> >
> >    Everything goes fine, and the performance is great as expected.
> >
> >    But when i use fwrite to store the payload into a file,
> >
> >    the performance decrease from 800mbps to 3mbps (input stream is 1
> Gbps).
> >
> >    Is is caused by the limitation of Virtual Disk IO? How can i solve it?
> >
> >    I have tried to search the answer, some people say "pthread" might
> solve
> > the problem.
> >
> >    Can someone give me some hint, i really appreciate for your help.
> >
> >
> > Best Regard,
> >
> > Kevin Cheng
>
> Two general issues you will hit writing to disk:
> 1) IO, including disk IO, is slow
> 2) System calls are slow.
>
> You are probably hitting both bottlenecks.
>
> /Bruce
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DPDK testpmd, Virtual Disk IO limitation
       [not found]       ` <CACnuE8GYK2E4LELuCsAdRChWViOY6jYLBYXA9AdGd4Bn9u8ZHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-03-25 17:32         ` Bruce Richardson
  2015-03-25 23:47           ` Cheng Kevin
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2015-03-25 17:32 UTC (permalink / raw)
  To: Cheng Kevin; +Cc: dev-VfR2kkLFssw

On Thu, Mar 26, 2015 at 12:20:42AM +0800, Cheng Kevin wrote:
> Mr. Bruce Richardson
> 
> Yes, you are right. This really bother me.
> 
> Is there any way to get rid of system call? Maybe some DPDK threading API?
> Maybe i should use a extra nic card for posting the data out through
> internet, instead of writing on the disk - ex. fwrite.
> 
> Or you have some better advises??
> 
> Thanks
> Kevin
> 

Hi Kevin,

what is your end-goal that you are trying to get to? 

/Bruce

> 
> 2015-03-25 23:01 GMT+08:00 Bruce Richardson <bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>:
> 
> > On Wed, Mar 25, 2015 at 10:06:48PM +0800, Cheng Kevin wrote:
> > > Hi all,
> > >
> > >    I am a beginner of DPDK. Recently, i am interest in DPDK vHost app -
> > > testpmd.
> > >
> > >    And i have been tracing on testpmd.c and iofwd.c for a while.
> > >
> > >    Also add some code inside iofwd.c for storing the payload of packets.
> > >
> > >    Everything goes fine, and the performance is great as expected.
> > >
> > >    But when i use fwrite to store the payload into a file,
> > >
> > >    the performance decrease from 800mbps to 3mbps (input stream is 1
> > Gbps).
> > >
> > >    Is is caused by the limitation of Virtual Disk IO? How can i solve it?
> > >
> > >    I have tried to search the answer, some people say "pthread" might
> > solve
> > > the problem.
> > >
> > >    Can someone give me some hint, i really appreciate for your help.
> > >
> > >
> > > Best Regard,
> > >
> > > Kevin Cheng
> >
> > Two general issues you will hit writing to disk:
> > 1) IO, including disk IO, is slow
> > 2) System calls are slow.
> >
> > You are probably hitting both bottlenecks.
> >
> > /Bruce
> >

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DPDK testpmd, Virtual Disk IO limitation
  2015-03-25 17:32         ` Bruce Richardson
@ 2015-03-25 23:47           ` Cheng Kevin
  0 siblings, 0 replies; 5+ messages in thread
From: Cheng Kevin @ 2015-03-25 23:47 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev-VfR2kkLFssw

Hi Mr.Bruce Richardson

    I expect the testpmd is able to store the payload of the coming packets
and that's all.
    However, as you can see, my program hits the bottlenecks.
    The performance is unable to reach 800mbps anymore.

    My end-goal is simple, finding a way to store the payload without
decreasing the speed of packet forwarding.

Thanks
Kevin



2015-03-26 1:32 GMT+08:00 Bruce Richardson <bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>:

> On Thu, Mar 26, 2015 at 12:20:42AM +0800, Cheng Kevin wrote:
> > Mr. Bruce Richardson
> >
> > Yes, you are right. This really bother me.
> >
> > Is there any way to get rid of system call? Maybe some DPDK threading
> API?
> > Maybe i should use a extra nic card for posting the data out through
> > internet, instead of writing on the disk - ex. fwrite.
> >
> > Or you have some better advises??
> >
> > Thanks
> > Kevin
> >
>
> Hi Kevin,
>
> what is your end-goal that you are trying to get to?
>
> /Bruce
>
> >
> > 2015-03-25 23:01 GMT+08:00 Bruce Richardson <bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
> >:
> >
> > > On Wed, Mar 25, 2015 at 10:06:48PM +0800, Cheng Kevin wrote:
> > > > Hi all,
> > > >
> > > >    I am a beginner of DPDK. Recently, i am interest in DPDK vHost
> app -
> > > > testpmd.
> > > >
> > > >    And i have been tracing on testpmd.c and iofwd.c for a while.
> > > >
> > > >    Also add some code inside iofwd.c for storing the payload of
> packets.
> > > >
> > > >    Everything goes fine, and the performance is great as expected.
> > > >
> > > >    But when i use fwrite to store the payload into a file,
> > > >
> > > >    the performance decrease from 800mbps to 3mbps (input stream is 1
> > > Gbps).
> > > >
> > > >    Is is caused by the limitation of Virtual Disk IO? How can i
> solve it?
> > > >
> > > >    I have tried to search the answer, some people say "pthread" might
> > > solve
> > > > the problem.
> > > >
> > > >    Can someone give me some hint, i really appreciate for your help.
> > > >
> > > >
> > > > Best Regard,
> > > >
> > > > Kevin Cheng
> > >
> > > Two general issues you will hit writing to disk:
> > > 1) IO, including disk IO, is slow
> > > 2) System calls are slow.
> > >
> > > You are probably hitting both bottlenecks.
> > >
> > > /Bruce
> > >
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-25 23:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 14:06 DPDK testpmd, Virtual Disk IO limitation Cheng Kevin
     [not found] ` <CACnuE8Fynh9PNekD5jLamTfnzp1E-9r11MwnLqP_u+n8wdE22Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-25 15:01   ` Bruce Richardson
2015-03-25 16:20     ` Cheng Kevin
     [not found]       ` <CACnuE8GYK2E4LELuCsAdRChWViOY6jYLBYXA9AdGd4Bn9u8ZHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-25 17:32         ` Bruce Richardson
2015-03-25 23:47           ` Cheng Kevin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.