0

I am trying to delete an extensive number of files(in several million) with command, find . -name "file*" -delete Terminal showed output of Killed. I searched over the internet and seen dmesg,

Out of memory: Kill process 25284 (find) score 691 or sacrifice child
Killed process 25284, UID 0, (find) total-vm:11666436kB, anon-rss:3229204kB, file-rss:620kB

I think it is due to OOM killer, as /proc/sys/vm/overcommit_memory shows overcommit is set to 0. I was wondering how can I avoid this issue? I can't delete the files manually.

0

The process its' not overcommiting memory, its' consuming actual memory almost 3 GB (anon-rss) making it legit to OOM.

Try remove command with regex , if its' show the same behavior ,its' likely because number of file here a post https://superuser.com/questions/1174259/high-memory-usage-of-the-find-command that propose listing all file to be deleted and perform removing one by one through Shell/Perl script.

  • If it's not OOM killer, who killed my process?I mean why it leads to OOM? – mahesh bhosale Jun 28 '17 at 17:25
  • Obviously the process is draining system memory, try deleting in loop with delay between iterations. – hoshoh Jun 29 '17 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.