postgresqltuner icon indicating copy to clipboard operation
postgresqltuner copied to clipboard

When running in an hypervisor with SSD disks, detection is not accurate.

Open guettli opened this issue 5 years ago • 8 comments

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)?

guettli avatar Feb 28 '19 11:02 guettli

Hi guetti, maybe is not related to your question above, but do you use the --ssd flag when running the script? Regards

PitoneMaledetto avatar Mar 01 '19 11:03 PitoneMaledetto

@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 avatar Mar 01 '19 13:03 guettli

@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.

jfcoz avatar Mar 01 '19 14:03 jfcoz

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.

guettli avatar Mar 02 '19 17:03 guettli

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.

cherio avatar Apr 10 '19 21:04 cherio

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.

guettli avatar Apr 11 '19 08:04 guettli

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 avatar Oct 30 '19 14:10 realulli

@realulli Why not check the performance of the disk and set the values according the this value (float value, not boolean)?

guettli avatar Oct 30 '19 16:10 guettli