Available RAM calculated in otbcli processes

In many otbcli processes (e.g. otbcli_DimensionalityReduction ) I get messages such as:
Estimated memory for full processing: 4473.96MB (avail.: 128 MB), optimal image partitioning: 35 blocks

I understand I can modify the 128 MB with the -ram option, but where does this 128 MB come from? Is it fixed or is it somehow calculated using information on the current free resources of the machine?

Thanks

Hello,

this is a default value. Note that it has been changed to 256 MB in the develop branch (https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/merge_requests/351)

Cédric

But despite stating -ram 256 (in 6.6.1) I still get:
Estimated memory for full processing: 5368.62MB (avail.: 128 MB)

so it seems -ram is not being considered. Should I fill a bug ticket or am I not understanding?
Agus

which application are you using ? and how are you using OTB (cli, monteverdi …) ?

$ otbcli_DimensionalityReduction -in …/…/Bert20190531_MOS/MULTIESPECTRAL/BertMICA20190531v2.tif -out …/…/Bert20190531_MOS/MULTIESPECTRAL/BertMICA20190531v2PCAotbfloat.tif -nbcomp 5 -normalize true -rescale -rescale.outmin 1 -rescale.outmax 255 -outmatrix …/…/Bert20190531_MOS/MULTIESPECTRAL/BertMICA20190531v2PCAotb.csv -ram 256

Instead, it works for otbcli_DimensionalityReduction

Looks like the RAM parameters only applies to the writer of the application, i.e. the object writing the output image… You can try to set the OTB_MAX_RAM_HINT environment variable, which should work for every processes in the application.

e.g.

export OTB_MAX_RAM_HINT=256