Pernicious USB-stick stall problem. Reverting workaround fix?

These are sysctl parameters. You can set them either by writing to /proc/sys/CATEGORY/ENTRY or by calling the sysctl command with the argumnent /proc/sys/CATEGORY/ENTRY=VALUE. These settings affect the running kernel, they are not persistent.

If you want to make these settings persistent, you need to set them at boot time. On Ubuntu, create a file in the directory /etc/sysctl.d called becko-vm-dirty.conf containing

# Shrink the disk buffers to a more reasonable size. See http://lwn.net/Articles/572911/
vm.dirty_background_bytes = 16777216
vm.dirty_bytes = 50331648

To revert the changes, write the old value back. There is no “restore defaults” command.

Note that these parameters are a bit peculiar: there are also parameters called vm.dirty_ratio and vm.dirty_background_ratio, which control the same setting but express the size as a percentage of total memory instead of a number of bytes. For each of the two settings, whichever of ratio or bytes was set last takes precedence.