Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of memory when using AWK #6

Open
fa1rid opened this issue Jul 5, 2020 · 0 comments
Open

Out of memory when using AWK #6

fa1rid opened this issue Jul 5, 2020 · 0 comments

Comments

@fa1rid
Copy link

fa1rid commented Jul 5, 2020

Hi,
Using this command awk '!(count[$0]++)' old.txt > new.txt with huge dictionary is causing out of memory problem and command to be killed by the kernel.

[16346.370650] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-0.slice/session-5.scope,task=awk,pid=17277,uid=0
[16346.370669] Out of memory: Killed process 17277 (awk) total-vm:31343560kB, anon-rss:31336728kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:61380kB oom_score_adj:0
[16347.841088] oom_reaper: reaped process 17277 (awk), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
@johnchen40904
Copy link

In my opinion, the easiest way to fix this was to create a bigger swap partion (to use part of your hard drive as memory). Use gparted to resize the partions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants