This is exactly what I have done wrong =) I've put read function into nif call with ERL_NIF_DIRTY_JOB_IO_BOUND flag and it has ruined whole performance. Now I have disabled it and performance now is normal. My functions are in perf top now. Thank you for help and thanks for all the tools, they are wonderful!