Parallel execution for appium 1.21.0

I am trying to set up a dynamic parallel execution for appium scripts. Currently the tests are starting one after the another. Could you please tell me about ways to make it memory independent parallel tests? Number of devices and type of devices are filled in dynamically.

Take a look at Selenium Grid:

https://appium.io/docs/en/advanced-concepts/grid/

If you are with Java you may use testNG or Junit for parallel run (check How to execute appium tests parallel on different devices using appium grid)