Can anyone tell me the working of dirty_bytes and dirty_background_bytes in the Linux VM tunable parameters.
I infer that dirty_bytes specifies the amount of memory after which the application doing a write, starts writing directly to disk. Is it correct or if the amount of memory allocated is used up, that portion is first transferred to disk and then new data is again stored in memory. eg. suppose I want to transfer a 1 GB file to disk and I set dirty_bytes to be 100 MB then once 100 MB have been written to memory, the application doing the writing now starts writing the data directly to disk or the 100 MB is transferred to the disk and then again 100 MB is written to memory and then transferred to disk and so on?
And in case of dirty_background_bytes, when the portion of dirty memory exceeds this then pdflush writes the dirty data back to disk in the background.
Is my understanding correct for these 2 parameters?