Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been charged about $2 in I/O queries.

Just curious if anyone could explain exactly what they are.

If I copy and paste a file in php from one local folder to another. Will that use up 1 I/O query?

share|improve this question
up vote 2 down vote accepted

No, it will certainly cost at least one I/O query ('operation' is a better term by the way) but how many depends entirely on the size of the file, the block/cluster size used by your file system and any other 'meta'-related sub-operations that may be involved in the file copy (i.e. index/catalogue updates, read-after-write verifications, deduplication where configured).

This is a VERY basic overview but if your file system used say 4KB blocks/clusters and you wanted to write less than 4KB of file then there's a chance that you'd be using between 2 and 16 write operations to do that (as there's this 'meta' overhead for most file systems). If you were writing a 400k file on the same file system then you'd expect to see between 102 and 116 or so operations, i.e. 400,000/4,000 plus a bit of 'fat' and the same is true where 4GB would be 4,000,000,000/4000 equalling 4m operations.

Also take into consideration that reads count as an operation too of course.

Now that might sound a lot as EBS works out for retail customer at about $0.10 per 1m IO operations but you may actually be reading/writing more than 4k per operation - I can't find any documentation to state exactly what EBS define as their maximum IO size - but it's not uncommon to see 64KB blocks used, so that would reduce your cost overall.

If you want to look at how many operations you're doing right now to help estimate these costs on a linux box then you can look at /proc/diskstats, from that table the first column is read operations and the fifth column is write operations, each since the system was started . If you add them together and divide them by your up-time then that's a rough estimate of how many operations per day you'll be getting. From that you can quickly multiply by your EBS rate and your billing period and there's your estimate!

Hope this helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.