* [uml-devel] slow execution in uml?
@ 2004-10-04 21:35 Young K
2004-10-05 18:21 ` BlaisorBlade
0 siblings, 1 reply; 3+ messages in thread
From: Young K @ 2004-10-04 21:35 UTC (permalink / raw)
To: user-mode-linux-devel
hi, folks,
i was comparing uml network performance with genuine linux. the experiment i
did was to insert time-stamping code in network stack, and see how slower
uml is. i was sending 32-byte udp packets to another machine every 10 msec,
and used rdtsc to measure the elapsed cpu cycles between sendto() and
nf_hook_slow() (which is called inside ip_build_xmit()).
what i found was that it took around 29,000 cycles from sendto() to
nf_hook_slow() in uml whereas only 2,000 cycles in genuine linux. it looks
like a big difference. but i think it's purely code execution without any
I/O operation between sendto() to nf_hook_slow(). then, why is it so slow in
uml? is there any possible factors that make uml slower? (more cache
misses?)
i used 2.4.22 for guest os(tt mode) and 2.4.25 for host os, but numbers were
pretty much the same when i used other versions of 2.4 kernels for both
guest and host. the computer i used for test was P4 2.2 GHz single processor
with 512MB, FYI.
_________________________________________________________________
Check out Election 2004 for up-to-date election news, plus voter tools and
more! http://special.msn.com/msn/election2004.armx
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [uml-devel] slow execution in uml?
2004-10-04 21:35 [uml-devel] slow execution in uml? Young K
@ 2004-10-05 18:21 ` BlaisorBlade
0 siblings, 0 replies; 3+ messages in thread
From: BlaisorBlade @ 2004-10-05 18:21 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Young K
On Monday 04 October 2004 23:35, Young K wrote:
> hi, folks,
>
> i was comparing uml network performance with genuine linux. the experiment
> i did was to insert time-stamping code in network stack, and see how slower
> uml is. i was sending 32-byte udp packets to another machine every 10 msec,
> and used rdtsc to measure the elapsed cpu cycles between sendto() and
> nf_hook_slow() (which is called inside ip_build_xmit()).
> what i found was that it took around 29,000 cycles from sendto() to
> nf_hook_slow() in uml whereas only 2,000 cycles in genuine linux. it looks
> like a big difference. but i think it's purely code execution without any
> I/O operation between sendto() to nf_hook_slow(). then, why is it so slow
> in uml? is there any possible factors that make uml slower?
> (more cache
> misses?)
What is slower in UML (a lot slower) is (at least):
- syscall execution
- page fault
At a first glance, I wouldn't be surprised if the syscall itself took 26,000
cycles (they are rdtsc units, right?). Please check by running either
getpid() or a non-existing syscall (with the _syscall0 macro from
<asm/unistd.h>). With SKAS mode and without SYSEMU for each syscall, 4 host
context switches are needed. This number drops down to 2 with SYSEMU, and
pure getpid() loops show 66% improvement from this. I also remember one test
(I think they were ByteBench result against an host system) where the exec()
throughput was various order of magnitude lower than the host, as the syscall
throughput.
> i used 2.4.22 for guest os(tt mode)
Well, using TT mode is a sure recipe for slow execution. And, quite frankly,
almost nobody cares about TT mode performance. It's too much slower. Don't
ask me why (I've read on the web-site that signal delivery is very slow, even
slower than a context switch, so TT mode is slower than SKAS, even if in TT
mode there are no context switches at all). So the syscall cost is your
problem. Try to run anything which is purely userspace, and if it does not do
a lot of page faults (which are VERY slow), it will run at full speed.
If you want to do any test in SKAS mode, they are welcome. For the host patch,
go to http://www.user-mode-linux.org/~blaisorblade/
Bye
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [uml-devel] slow execution in uml?
@ 2004-10-05 18:41 Young K
0 siblings, 0 replies; 3+ messages in thread
From: Young K @ 2004-10-05 18:41 UTC (permalink / raw)
To: blaisorblade_spam, user-mode-linux-devel
Hi,
>
>What is slower in UML (a lot slower) is (at least):
>- syscall execution
>- page fault
>
>At a first glance, I wouldn't be surprised if the syscall itself took
>26,000
>cycles (they are rdtsc units, right?).
Thanks for the reply. But, i measured the time after sys_sendto() is called.
i mean, timestamp was made inside sys_sendto() kernel routine. so, syscall
overhead wouldn't be included. what do you think?
_________________________________________________________________
Check out Election 2004 for up-to-date election news, plus voter tools and
more! http://special.msn.com/msn/election2004.armx
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-05 18:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-04 21:35 [uml-devel] slow execution in uml? Young K
2004-10-05 18:21 ` BlaisorBlade
-- strict thread matches above, loose matches on Subject: below --
2004-10-05 18:41 Young K
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox