Reputation: 33
Is there any way to calculate IOPS per query in postgresql on ubuntu?
I am using PostgreSQL 9.2 and Ubuntu 13.04. I need to calculate this for determining hardware requirement for project.
Upvotes: 3
Views: 3381
Reputation: 22943
Not really. It doesn't really make sense to try.
Assuming a fixed setup of memory and disks, the amount of I/O depends not only upon the query itself, but also on caching. That's going to be affected not only by what other queries are running concurrently, but also the recent history of activity on that server.
What you can do is run some typical/expected workloads on some sample hardware and gauge what its limits are. It's not as simple as doubling the RAM+disk bandwidth to double performance though.
If you want to learn more, I can highly recommend this book by Greg Smith - don't be worried that it's referencing PostgreSQL 9.0, most of the advice can be applied to any version of any database. Also - consider joining the PostgreSQL mailing lists and asking there, you can have a longer discussion than stackoverflow supports comfortably.
Upvotes: 1