# TrainVectorClassifier RAM CACHE and Processing time

**URL:** <https://forum.orfeo-toolbox.org/t/trainvectorclassifier-ram-cache-and-processing-time/3255>\
**Category:** OTB Usage\
**Created:** [February 21, 2025, 4:07pm UTC](https://forum.orfeo-toolbox.org/t/trainvectorclassifier-ram-cache-and-processing-time/3255 "2025-02-21T16:07:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prins](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/p/838e76/32.png) [@Prins](https://forum.orfeo-toolbox.org/u/Prins)\
**Post date:** [February 21, 2025, 4:07pm UTC](https://forum.orfeo-toolbox.org/t/trainvectorclassifier-ram-cache-and-processing-time/3255/1 "2025-02-21T16:07:22Z")

</div>

Hi,

Am using OTB in QGIS to make a classification based upon a segmentation and this has worked previously - although I could see that the system was under pressure for RAM, CACHE as the processing time ect take some time etc. Now I have increased the number of raster bands and the TrainVectorClassifyer appears to still be running after 30 hr however listing occasionally Warning: reaching max number of iterations - it did that before but not so many times and made it at last (perhaps 1 hr). I can see it’s only using about 17% PC resources (i7 – Win10-x64) and ca 20% RAM (of 32 GB)

My questions: will it complete? Is there any way to optimise or allocate more resources within QGIS? .e.g. increase GDAL\_CACHEMAX or something else?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Prins](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/p/838e76/32.png) [@Prins](https://forum.orfeo-toolbox.org/u/Prins)\
**Post date:** [February 28, 2025, 9:15am UTC](https://forum.orfeo-toolbox.org/t/trainvectorclassifier-ram-cache-and-processing-time/3255/2 "2025-02-28T09:15:05Z")

</div>

Hi again,

Appeared to be solved - I increased the default ram for OTB 10 times (2560 MB) and GDAL\_CACHEMAX 8 times - now it is fast

---

<div class="post-metadata">

**Author:** ![tristanlaurent](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/t/eb9ed0/32.png) [@tristanlaurent](https://forum.orfeo-toolbox.org/u/tristanlaurent)\
**Post date:** [March 3, 2025, 1:39pm UTC](https://forum.orfeo-toolbox.org/t/trainvectorclassifier-ram-cache-and-processing-time/3255/3 "2025-03-03T13:39:33Z")

</div>

Hi @Prins , thank you for the sharing.  
You can also increase the number of threads used in the “Advanced” section of the algorithm, then use the “Number of thread to use” in “Environment parameters” section :

 ![Capture d’écran du 2025-03-03 14-35-59](https://forum.orfeo-toolbox.org/uploads/default/original/2X/8/84d5eec4d8390ac72d384d04034b1070a3439aa8.png)  
 ![Capture d’écran du 2025-03-03 14-36-07](https://forum.orfeo-toolbox.org/uploads/default/original/2X/5/5500ab018ae40e66e02dd8c80de6754f4b401363.png)

Best regards

Tristan

---

<div class="post-metadata">

**Author:** ![Prins](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/p/838e76/32.png) [@Prins](https://forum.orfeo-toolbox.org/u/Prins)\
**Post date:** [March 4, 2025, 7:11pm UTC](https://forum.orfeo-toolbox.org/t/trainvectorclassifier-ram-cache-and-processing-time/3255/4 "2025-03-04T19:11:19Z")

</div>

Thanks a lot Tristan,

That one was already up. I haven’t tested which one or both of the two changes made the difference, but it works well now 👍
