I am running ubuntu on BBB and I have an external HDD attached over USB.
I am having trouble reading large files on the external disks over sftp and ftp. I tried different ftp clients but the result is the same. After reading some of the file, typically a few GB, the cpu uses 100% CPU and the speed drops to practically nothing.
I believe I have traced the problem to be an issue of reading from the disk. If I make a large file:
dd if=/dev/zero of=file.txt count=1024 bs=4000000
(which is not a problem apparently)
and then read it using
time sh -c “dd if=file.txt bs=4k”
It will in a few minutes jump to use 100% CPU and in many instances crash the ssh session with:
"The client has disconnected from the server. Reason:
Message Authentication Code did not verify (packet #222795). Data integrity has been compromised. "
I found some discussion (https://bbs.archlinux.org/viewtopic.php?id=112846&p=4) of what seems to be a similar issue where they suggest to set /sys/kernel/mm/transparent_hugepage/defrag to madvise. But I don’t know how to try that on the BBB or if it is even relevant.
Any idea about how to resolve this nasty problem?