Why is Kali Linux not responding

System freezes / stops responding when copying large files to USB

Yesterday I copied a single 8GB file to a USB stick at a slow write speed of 7MB / s while my RAM was 3GB. While copying, the system stopped until I could no longer move the cursor.

I managed to log into the text console and ran. It found that a process named was consuming 99.99% of the I / O.

Are there workarounds so that copying a large file doesn't make my system unusable?


As per this bug report, I solved it by adding the following lines

in /etc/sysctl.conf

and runs

I ran into a similar problem. Mine is 64 bit Ubuntu 14.04. After a long struggle, I found an answer that solves my problem. For ease of use, I've added the following commands that were used in the above answer. Check the answer for detailed explanations.

After using the above command, the system started copying files normally.

Thanks to @Rmano.

A similar problem with system freezing occurs when copying to a flash drive. I submitted a bug report about it: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1267648

As a workaround, I found that disabling Swap completely eliminated the problem.

Yes, there are kernel settings that you can use to determine how much data must be marked as written before it is actually written to disk. Look here for a pretty comprehensive description of them. Specifically, you want to find a value for dirty_ratio that works well for you (usually it's too high for desktop / laptop by default, but there isn't a magic number that works for everyone).

I had similar problems copying files to a drive. I had fewer problems using a file system on my USB hard drive.

I just had the exact same problem (in 2019) on Ubuntu 19.10 when copying a large number of files from the USB hard drive to the SATA hard drive. Both file systems are ext4. When I turned off the swap, the problem went away. It looks like a bug in the memory allocation for hard disk buffers - apparently the kernel is trying to allocate as much memory as possible for hard disk buffers in such a situation, which makes no sense (create disk buffers in swap ...) or it just incorrectly calculates the memory size that can be used for caching ...

We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By continuing, you consent to our use of cookies and other tracking technologies and affirm you're at least 16 years old or have consent from a parent or guardian.

You can read details in our Cookie policy and Privacy policy.