Buffer Full and journal disk

Hey dude , in wich file i can edit the size from ElastichSearch and Graylog and SO… Becouse i have a big problem , i recibe like 5000msg/s but the buffer overloads 100% . I have 2 cpu and 4 ram .