On 08/07/16 21:03, Артём Литвинович wrote:
> Greetings.
>
> Apparently, ubd is too slow for practical use.
> I'm getting 0.8 Mb/s write speed, while hostfs does 25 Mb/s (and on
> the host itself it's similar).
> This is rather frustrating for such a great project as UML is, and i'd
> like to try fixing this.
>
> So, two questions.
>
> First, am i missing something?
> Is it actually normal for ubd to be that slow?
> I looked around, and apparently it is slow due to design. There even
> were some ancient patches to try to fix that.

Check if you have sync turned on.

>
> Second, why is this problem hard?
> This was going on for over a decade, and no one made a better version,

Not quite, I have one in my patch queue, just no timeslots to work on it.

> which implies a hard problem.

Not really, It is an age old problem - single sector vs multi-sector
read/write - same as ancient PIO IDE vs DMA that replaced it.

As I said - I have patchsets, I however messed up the submission last
time so only some of the simple things like syscall reduction are there.

Actual bulking of requests, etc did not go in. I plan to go back to it
later this summer when I have more time.

> I would love to hear from someone who is familiar with how the code
> works, about what the problems are (instead of hitting my head against
> them later).
> Specifically, why use the IO thread?

Form of async IO - very similar to what posix async IO implementations
do. If done correctly it can speed up things quite a bit. For it however
actual files need to be opened async. The number you quoted makes me
think you have sync enabled (it is enabled in some distros by default
via kernel config options).

A.

> Hostfs seem to work just fine with calling the native read/write directly.
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> User-mode-linux-devel mailing list
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
>


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to