postgresqltuner
postgresqltuner copied to clipboard
When running in an hypervisor with SSD disks, detection is not accurate.
I read this in the README:
When running in an hypervisor with SSD disks, detection is not accurate.
I guess you are trying to detect if there are SSD disks and then you have a boolean flag.
Why do you do it this way?
Why not check the performance of the disk and set the values according the this value (float value, not boolean)?
Hi guetti, maybe is not related to your question above, but do you use the --ssd flag when running the script? Regards
@PitoneMaledetto I know the --ssd
flag. But I have great feeling. It is love. It is called "automation". I don't to supply a flag. I love it, if scripts can collect all needed information themselves. And in this case I guess it is not black magic.
@guettli , benching disk would be too agressive, it could have a perfomance impact on a production database and/or report bad values due to parallel database activity.
The design of this script was made to be non-agressive to the server performances.
Why not let the user decide?
You could provide a autodetect-ssd flag and a server-has-ssd flag.
Then the user can decide what he wants. There are arguments for both ways.
Then everyone would be happy.
When scanning for "rotational" flag you filter out special directories ("." and "..") and "^sr" devices. It makes sense to add a filter for "^loop" devices as well. Those are pseudo devices.
Devices can have different names. Is it possible to measure the performance of the drive? This is the value which is all about. After measuring the performance the matching config value can get calculated.
Where do you draw the line? Imagine your VM running on a storage with spinning rust and half a TB of cache - are you planning to write a ton of data so a really large cache fills up?
Really, detection of SSDs is unreliable when it's hidden behind a virtualization layer.
@realulli Why not check the performance of the disk and set the values according the this value (float value, not boolean)?