Some people on the internet wrote something like this
Reduce Resources Used by noderunner.exe in SharePoint 2013 Second one is the one that is strictly not supported and not recommended. Please don't tell Microsoft you've heard this from me ;-) And once again: it's for dev/demo environments ONLY!!!
As you know, several search services run as noderunner.exe on the server(s). They can consume a LOT of memory, but the good news is: you can limit their memory usage! The magic is: go to the folder C:\Program Files\Microsoft Office Servers\15.0\Search\Runtime\1.0 and look for a line like this:
The zero means "unlimited" here. The only thing to do is to set to the amount of RAM you'd like to set as a limit for each noderunner.exe processes.
BUT I WARN YOU
Never ever change memoryLimitMegabytes.
If search component wants to consume more than your limit upon start (and it will do after some time in work), it crushes upon start and you'll end up with cryptoerrors in ULS and non-working search.