Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac OS X File IO Performance Issue?




On Jul 29, 2005, at 12:52 PM, Greg Guerin wrote:

William Groppe wrote:

I've written a program that needs to read/write lots of cache files to
disk. They are around 100k a piece though it can vary quite a bit.
In response to user action I need to load 2-5 of these cache files and
update the GUI. On windows and linux the read times for these cache
images average around 250ms. However on OS X the mean time to load
rises to 450ms with some exceeding 1200ms.

Are you sure the bottleneck is I/O speed, and not something else like decoding the image-files?

Have you run a profile on your actual program, to find out where the time
is really being spent?


Are you sure there isn't a networked disk-volume involved?

Yeah something seems a little weird in your numbers William, we likely need more information about what is going on. Also no idea what system you are using (unless I missed it).


On my Mac OS X 10.4.2 system I can run the following grep test against 10,000 files all 100KB in size (remade my test files to that size, 100 folders deep with 100 files in each).

[G5:~/test] shawnce% time grep -a -R 666 dir_0 > /dev/null
1.560u 1.408s 0:03.04 97.3%     0+0k 0+1io 0pf+0w

This tells me that my PowerMac Dual G5 2GHz (with one CPU burning away on Folding@home) is able to open, read, and search 976 MB (10,000 files * 100KB per file) in 3.04 seconds when coming from the file cache (had already touched the files in question, no disk IO was incurred).

That is about 321 MB/s overall and about 3,289 100KB files per second, generally limited by CPU.

If I do the test again without things in the file cache I get....

[G5:~/test] shawnce% time grep -a -R 666 dir_0 > /dev/null
2.161u 8.148s 0:37.58 27.4%     0+0k 441+545io 0pf+0w

That is about 26 MB/s overall and about 266 100KB files per second. This means it is taking around 4 milliseconds to read and process each file, clearly much faster then you reported above (4 ms * 5 files is 20 ms about 20 times faster then what you reported). Unless I did some math incorrectly...

Disk / filesystem information...

Model:    Maxtor 6Y250M0
Revision:    YAR51FW0
Socket Type:    Serial-ATA
S.M.A.R.T. status:    Verified
Capacity:    233.76 GB
Available:    85.32 GB
File System:    Journaled HFS+

-Shawn


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Mac OS X File IO Performance Issue? (From: Greg Guerin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.