qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Question about posixaio thread number.
@ 2011-08-03  5:19 Gui Jianfeng
  2011-08-03  6:33 ` Gui Jianfeng
  2011-08-03  7:23 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Gui Jianfeng @ 2011-08-03  5:19 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Hi Anthony,

I started a guest with cache=none and aio=threads

When i did some io tests in Guest say dd like
dd if=/dev/zero oflag=direct of=/mnt/sdb1/date.img bs=4k count=262114

qemu will start one or several threads to perform IO requests.

It seems qemu makes use of its own posixaio. I'm wondering how qemu
decides how many threads should be created to perform io operation?

Thanks,
Gui

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

* [Qemu-devel] Question about posixaio thread number.
  2011-08-03  5:19 [Qemu-devel] Question about posixaio thread number Gui Jianfeng
@ 2011-08-03  6:33 ` Gui Jianfeng
  2011-08-03  7:23 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Gui Jianfeng @ 2011-08-03  6:33 UTC (permalink / raw)
  To: qemu-devel, Anthony Liguori

Hi Anthony,

I started a guest with cache=none and aio=threads

When i did some io tests in Guest say dd like
dd if=/dev/zero oflag=direct of=/mnt/sdb1/date.img bs=4k count=262114

qemu will start one or several threads to perform IO requests.

It seems qemu makes use of its own posixaio. I'm wondering how qemu
decides how many threads should be created to perform io operation?

Thanks,
Gui

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

* Re: [Qemu-devel] Question about posixaio thread number.
  2011-08-03  5:19 [Qemu-devel] Question about posixaio thread number Gui Jianfeng
  2011-08-03  6:33 ` Gui Jianfeng
@ 2011-08-03  7:23 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2011-08-03  7:23 UTC (permalink / raw)
  To: Gui Jianfeng; +Cc: qemu-devel

On Wed, Aug 3, 2011 at 6:19 AM, Gui Jianfeng <guijianfeng@cn.fujitsu.com> wrote:
> When i did some io tests in Guest say dd like
> dd if=/dev/zero oflag=direct of=/mnt/sdb1/date.img bs=4k count=262114
>
> qemu will start one or several threads to perform IO requests.
>
> It seems qemu makes use of its own posixaio. I'm wondering how qemu
> decides how many threads should be created to perform io operation?

Look at posix-aio-compat.c.

If a new request comes in and there is no idle thread around, a new
thread will be spawned up to a maximum limit.

When you run a synchronous I/O workload like dd(1), expect to see only
1 or 2 aio worker threads.  If the workload is multithreaded, expect
to see many (depending on the guest's queue depth).

Stefan

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

end of thread, other threads:[~2011-08-03  7:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03  5:19 [Qemu-devel] Question about posixaio thread number Gui Jianfeng
2011-08-03  6:33 ` Gui Jianfeng
2011-08-03  7:23 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).