There are some predefined values in the game launcher settings. It is not necessary to apply all the solutions, but you can apply as many as possible or needed. I have tested all these methods and those all work perfectly for me. These solutions are good for almost all operating systems. In case you experience frequent Dota 2 crashes while loading the game or during the game-play, then you need to read this article.