When using a USB HDD (probably a stick as well), there can be large delays when using a Ubuntu machine while waiting for data to be synced to the disk. After much googling, trying different filesystems and tweaking mount options, the solution that worked was:

echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes

Which i found here: http://unix.stackexchange.com/questions/107703/why-is-my-pc-freezing-while-im-copying-a-file-to-a-pendrive/107722#107722 http://lwn.net/Articles/572911/

 

Topics