I had a File IO interface that was implemented using stdlib fopen/fclose functions and it was working well until we had to change it for synchronous implementation for preventing data loss(one of the scenario). So I replaced all the stdlib file IO calls with system calls (open()/close() etc.). with these changes I started seeing the performance issues. I understand that some performance degradation is expected but I don't know how much impact I should expect and happily allow.
According to my understanding, this degradation in performance is majorly due to the fact that stdlib file IO interfaces provide caching in our process space for fast read writes; but still, I am not sure HOW caching is provided by stdlib file io interfaces.
Once I have this clarity I think I would be able to understand the performance degradation and hence would understand its quantum.