Why does SnapRAID get the CPU usage wrong? Here is a screenshot showing an example. SnapRAID says 20%, but atop shows the SnapRAID process using 43% of CPU.
The CPU value reported by SnapRAID is the percentage of time elapsed doing parity and hashing computations compared to disk operations.
So, if you get CPU 20% it means that for 80 % SnapRAID is doing disk operations.
I think that it can be approximated counting only the usermode CPU time of the process. In fact, it also surprise me that for operating on disks so many CPU cycles are required by the system. But so it seems.
Ciao,
Andrea
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How is this useful to know? I mean, why would a user want to know what is the ratio of CPU time SnapRAID spends doing computations to disk operations?
Before your explanation, I thought it was just the CPU percentage that the SnapRAID process was using. That would be useful for the user to know because if it is close to 100% then it means that SnapRAID is CPU-limited rather than disk throughput limited.
But now that you explained that SnapRAID is actually reporting the ratio, I am trying to understand how this information is useful to know.
Is it possible for this number to exceed 100% ? If so, what conclusion can a user draw from that information?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Why does SnapRAID get the CPU usage wrong? Here is a screenshot showing an example. SnapRAID says 20%, but atop shows the SnapRAID process using 43% of CPU.
http://i.imgur.com/NaYSNkv.png
Hi jwill42,
The CPU value reported by SnapRAID is the percentage of time elapsed doing parity and hashing computations compared to disk operations.
So, if you get CPU 20% it means that for 80 % SnapRAID is doing disk operations.
I think that it can be approximated counting only the usermode CPU time of the process. In fact, it also surprise me that for operating on disks so many CPU cycles are required by the system. But so it seems.
Ciao,
Andrea
How is this useful to know? I mean, why would a user want to know what is the ratio of CPU time SnapRAID spends doing computations to disk operations?
Before your explanation, I thought it was just the CPU percentage that the SnapRAID process was using. That would be useful for the user to know because if it is close to 100% then it means that SnapRAID is CPU-limited rather than disk throughput limited.
But now that you explained that SnapRAID is actually reporting the ratio, I am trying to understand how this information is useful to know.
Is it possible for this number to exceed 100% ? If so, what conclusion can a user draw from that information?
Hi will42,
It's just a generic indicator. If you see it changing, it means that your system is working differently than before.
Ciao,
Andrea