On 1/4/11 5:17 PM, Christopher Smith wrote:
> If you use direct I/O to reduce CPU time, that means you are saving CPU via
> DMA. If you are using Java's heap though, you can kiss that goodbye.
The buffer for direct I/O cannot be allocated from Java's heap anyway, I don't
understand what you mean?
> 
> That said, I'm surprised that the Atom can't keep up with magnetic disk
> unless you have a striped array. 100MB/s shouldn't be too taxing. Is it
> possible you're doing something wrong or your CPU is otherwise occupied?
Yes, my C program can reach 100MB/s or even 110MB/s when writing data to the
disk sequentially, but with direct I/O enabled, the maximal throughput is about
140MB/s. But the biggest difference is CPU usage.
Without direct I/O, operating system uses a lot of CPU time (the data below is
got with top, and this is a dual-core processor with hyperthread enabled).
Cpu(s):  3.4%us, 32.8%sy,  0.0%ni, 50.0%id, 12.1%wa,  0.0%hi,  1.6%si,  0.0%st
But with direct I/O, the system time can be as little as 3%.

Best,
Da
> 
> On Tue, Jan 4, 2011 at 9:58 AM, Da Zheng <zhen...@cs.jhu.edu> wrote:
> 
>> The most important reason for me to use direct I/O is that the Atom
>> processor is too weak. If I wrote a simple program to write data to the
>> disk, CPU is almost 100% but the disk hasn't reached its maximal bandwidth.
>> When I write data to SSD, the difference is even larger. Even if the program
>> has saturated the two cores of the CPU, it cannot even get to the half of
>> the maximal bandwidth of SSD.
>>
>> I don't know how much benefit direct I/O can bring to the normal processor
>> such as Xeon, but I have a feeling I have to use direct I/O in order to have
>> good performance on Atom processors.
>>
>> Best,
>> Da
> 
> 

Reply via email to