Whats the difference between using and not using Elasticsearch?

if you just want to try out sonarqube, yes but if you really want to deploy it, No. vm.max_map_count = 524288 is there to fulfill the requirements of sonarqube as documented here: Prerequisites and Overview | SonarQube Docs