Gabriel Sadaka
Gabriel Sadaka

Reputation: 1746

What is more expensive for databases, IO or CPU?

I am investigating different structures for our database, which is expected to contain millions of files. I have narrowed it down to two different models; one of which is 4 times faster and uses 3 times less CPU, but uses 4 times more IO reads than the other.

So what is more expensive in both money and server bottlenecks, considering we are planning to host it in either Amazon or Azure cloud, IO or CPU?

Upvotes: 1

Views: 192

Answers (2)

Froyke
Froyke

Reputation: 1145

Just want to add one more variable - Memory. High memory instances can dramatically reduce the IOPS / CPU requirements.

For example - a MongoDB instance which have most of its working set in memory - hardly do IO calls.

And I agree with jeremyjjbrown - test, test, test. Your KPI would be transactions (R/W) per seconds and transactions per Dollar.

Upvotes: 2

jeremyjjbrown
jeremyjjbrown

Reputation: 8009

It totally depends on the type of IO device and the size of the virtualized instance used. In a cloud hosted environment the real hardware specs are totally abstracted into marketing terms like EC2 Compute Unit. The only real way to know is to spin up in all environments and load test. Anything else is just a plain old guess.

Upvotes: 4

Related Questions