RE: [suse-programming-e] Problems with POSIX Asynchronous IO
1. I ran top with an update every second, and it confirms that aiotest uses 0.0% of the CPU. I have a 2.8 GHz Pentium 4 machine.
Oh! Now I understand why you didn't see high CPU utilisation. top(1) is broken in this respect--for some reason it's not counting CPU utilisation (and presumably other resource utilisation) by threads other than the first/main one, at least in the case of this test case. This problem occurs on SLES 9 as well... I haven't had time to look into it much further yet, but I guess it's worth opening a bug to SuSE about it.
Try using vmstat(1) or ps(1) in show-all-threads mode instead. It sounds like the problem does occur on your machine, so I expect if you rerun the test and watch the CPU using vmstat, you'll see the high CPU utilisation.
Using ps as you did, or with the -m or -T thread-switches does still not show any CPU usage for aiotest. I can see the two threads, However, 'vmstat 1' displays that I am using The CPU 50/50 in user- and kernel- space.
2. The number of io_getevents increases proportionally to the sleep-period, with about 19 calls per milliseconds.
I guess the 19 io_getevents per ms is too CPU intensive for your machine?
Given that I now believe the problem occurs on your SuSE 9.1 install as well, I think you'll find that the number of io_getevents calls increases in proportion to the speed of CPU, i.e. the faster the CPU, the faster handle_kernel_aio will spin.
I appreciate your time testing this for me.
Thanks, -mjg -- Matthew Gregan |/ /| kinetik@orcon.net.nz
Håkon Hallingstad
participants (1)
-
Hallingstad Håkon