Lack of memory and need to work on swap
My computer (running Ubuntu 16.04) has 8GB memory and 8GB of swap. When I use my computer it ends up freezing due to a lack of RAM. How can I make it work on swap when there is no memory left?
The output to free
is:
total used free shared buff/cache available
Mem: 7.7G 3.1G 132M 692M 4.4G 3.5G
Swap: 7.9G 0B 7.9G
14.04 ram swap
|
show 2 more comments
My computer (running Ubuntu 16.04) has 8GB memory and 8GB of swap. When I use my computer it ends up freezing due to a lack of RAM. How can I make it work on swap when there is no memory left?
The output to free
is:
total used free shared buff/cache available
Mem: 7.7G 3.1G 132M 692M 4.4G 3.5G
Swap: 7.9G 0B 7.9G
14.04 ram swap
What is your output offree
command?
– Alvin Liang
Dec 21 '18 at 2:13
Readman swapon
– waltinator
Dec 21 '18 at 2:27
1
The applications you use for simulation may need more RAM. Swaps primary purpose is to hold memory pages that are not immediately needed, which should free up RAM for new processes. Aside from getting larger RAM sticks, consider tuning your system - see askubuntu.com/q/2194/295286 . I'd say decrease number of services you have starting on boot, use lighter desktop ( if you use any ), consider parallelizing tasks, try to limit resources for certain processes
– Sergiy Kolodyazhnyy
Dec 21 '18 at 3:08
1
The bottom line is this... upgrade your memory. Yourfree -h
command shows no swap usage, but you may have used that command when nothing was going on. Sure, you could play with various settings likevm.swappiness
, but it wouldn't change the fact that you need more physical RAM. You could also change your script to only read in portions of the text file, so that it doesn't use all of your existing RAM.
– heynnema
Dec 21 '18 at 3:18
I think buy an SSD will improve text file editing throughput scenario the most. When text file reading and swap activating happens at the same time, it will not help you finish the task any quicker.
– Alvin Liang
Dec 21 '18 at 3:53
|
show 2 more comments
My computer (running Ubuntu 16.04) has 8GB memory and 8GB of swap. When I use my computer it ends up freezing due to a lack of RAM. How can I make it work on swap when there is no memory left?
The output to free
is:
total used free shared buff/cache available
Mem: 7.7G 3.1G 132M 692M 4.4G 3.5G
Swap: 7.9G 0B 7.9G
14.04 ram swap
My computer (running Ubuntu 16.04) has 8GB memory and 8GB of swap. When I use my computer it ends up freezing due to a lack of RAM. How can I make it work on swap when there is no memory left?
The output to free
is:
total used free shared buff/cache available
Mem: 7.7G 3.1G 132M 692M 4.4G 3.5G
Swap: 7.9G 0B 7.9G
14.04 ram swap
14.04 ram swap
edited Dec 22 '18 at 8:22
mook765
3,82921330
3,82921330
asked Dec 21 '18 at 1:48
user861893
What is your output offree
command?
– Alvin Liang
Dec 21 '18 at 2:13
Readman swapon
– waltinator
Dec 21 '18 at 2:27
1
The applications you use for simulation may need more RAM. Swaps primary purpose is to hold memory pages that are not immediately needed, which should free up RAM for new processes. Aside from getting larger RAM sticks, consider tuning your system - see askubuntu.com/q/2194/295286 . I'd say decrease number of services you have starting on boot, use lighter desktop ( if you use any ), consider parallelizing tasks, try to limit resources for certain processes
– Sergiy Kolodyazhnyy
Dec 21 '18 at 3:08
1
The bottom line is this... upgrade your memory. Yourfree -h
command shows no swap usage, but you may have used that command when nothing was going on. Sure, you could play with various settings likevm.swappiness
, but it wouldn't change the fact that you need more physical RAM. You could also change your script to only read in portions of the text file, so that it doesn't use all of your existing RAM.
– heynnema
Dec 21 '18 at 3:18
I think buy an SSD will improve text file editing throughput scenario the most. When text file reading and swap activating happens at the same time, it will not help you finish the task any quicker.
– Alvin Liang
Dec 21 '18 at 3:53
|
show 2 more comments
What is your output offree
command?
– Alvin Liang
Dec 21 '18 at 2:13
Readman swapon
– waltinator
Dec 21 '18 at 2:27
1
The applications you use for simulation may need more RAM. Swaps primary purpose is to hold memory pages that are not immediately needed, which should free up RAM for new processes. Aside from getting larger RAM sticks, consider tuning your system - see askubuntu.com/q/2194/295286 . I'd say decrease number of services you have starting on boot, use lighter desktop ( if you use any ), consider parallelizing tasks, try to limit resources for certain processes
– Sergiy Kolodyazhnyy
Dec 21 '18 at 3:08
1
The bottom line is this... upgrade your memory. Yourfree -h
command shows no swap usage, but you may have used that command when nothing was going on. Sure, you could play with various settings likevm.swappiness
, but it wouldn't change the fact that you need more physical RAM. You could also change your script to only read in portions of the text file, so that it doesn't use all of your existing RAM.
– heynnema
Dec 21 '18 at 3:18
I think buy an SSD will improve text file editing throughput scenario the most. When text file reading and swap activating happens at the same time, it will not help you finish the task any quicker.
– Alvin Liang
Dec 21 '18 at 3:53
What is your output of
free
command?– Alvin Liang
Dec 21 '18 at 2:13
What is your output of
free
command?– Alvin Liang
Dec 21 '18 at 2:13
Read
man swapon
– waltinator
Dec 21 '18 at 2:27
Read
man swapon
– waltinator
Dec 21 '18 at 2:27
1
1
The applications you use for simulation may need more RAM. Swaps primary purpose is to hold memory pages that are not immediately needed, which should free up RAM for new processes. Aside from getting larger RAM sticks, consider tuning your system - see askubuntu.com/q/2194/295286 . I'd say decrease number of services you have starting on boot, use lighter desktop ( if you use any ), consider parallelizing tasks, try to limit resources for certain processes
– Sergiy Kolodyazhnyy
Dec 21 '18 at 3:08
The applications you use for simulation may need more RAM. Swaps primary purpose is to hold memory pages that are not immediately needed, which should free up RAM for new processes. Aside from getting larger RAM sticks, consider tuning your system - see askubuntu.com/q/2194/295286 . I'd say decrease number of services you have starting on boot, use lighter desktop ( if you use any ), consider parallelizing tasks, try to limit resources for certain processes
– Sergiy Kolodyazhnyy
Dec 21 '18 at 3:08
1
1
The bottom line is this... upgrade your memory. Your
free -h
command shows no swap usage, but you may have used that command when nothing was going on. Sure, you could play with various settings like vm.swappiness
, but it wouldn't change the fact that you need more physical RAM. You could also change your script to only read in portions of the text file, so that it doesn't use all of your existing RAM.– heynnema
Dec 21 '18 at 3:18
The bottom line is this... upgrade your memory. Your
free -h
command shows no swap usage, but you may have used that command when nothing was going on. Sure, you could play with various settings like vm.swappiness
, but it wouldn't change the fact that you need more physical RAM. You could also change your script to only read in portions of the text file, so that it doesn't use all of your existing RAM.– heynnema
Dec 21 '18 at 3:18
I think buy an SSD will improve text file editing throughput scenario the most. When text file reading and swap activating happens at the same time, it will not help you finish the task any quicker.
– Alvin Liang
Dec 21 '18 at 3:53
I think buy an SSD will improve text file editing throughput scenario the most. When text file reading and swap activating happens at the same time, it will not help you finish the task any quicker.
– Alvin Liang
Dec 21 '18 at 3:53
|
show 2 more comments
1 Answer
1
active
oldest
votes
Many people do not understand the nature of swap: it's very slow!
For an old machine with DDR3 1600 memory:
- the memory transfer rate is 12800 MB/s,
- a HDD rate is around 100-200 MB/s,
- a SSD rate is maximum 600 MB/s
So if the memory pressure is so high that swap usage is frequent, everything will still work, but will slow down tremendously because the speed of swap is less than 1/1000 of the normal memory.
Where swap can help us in daily life is that if you're running multiple programs, less frequently used program can be swapped out but are still retained in the system. You wait 2-3 minutes to allow less active pages to go to swap, then you can use your current Application without much pain. And in many cases the less active pages never swap back again so there's no further penalty.
But when you talk about simulation, which means your data is huge and swap in/out activities will be frequent, it just looks like your system is freezing, because more than 99.9% of the CPU time is in uninterruptible iowait.
So the solution to your problems is:
- Buy more RAM
- Have tremendous patience and wait 1000 times longer with your current setup
- Add an SSD and still have a lot of patience and wait 100 times longer...
2
I'm not sure I agree that "freezing is the normal behavior", and that it "doesn't help to tune your swap". Between tuning applications vs physical RAM vs swap size/settings, there are things that can be done to improve the status quo.
– heynnema
Dec 21 '18 at 3:27
Well, it depends how much memory he's using for simulator. But when swap is activating heavily, system will be slow to nearly freezed, that is for sure.
– Alvin Liang
Dec 21 '18 at 3:35
1
The OP's script that edits a 8G text file in RAM is very suspect from a performance and swapping standpoint. Many modern computers with SSD make swapping almost a non-issue. But as my comment to the OP indicates, they need more RAM, if they change nothing else.
– heynnema
Dec 21 '18 at 3:37
Alvin An edit and an upvote! ;-) @heynnema have a look now. His basic idea is good, just the "freezing" part was incorrect as you and me see it as "sigstop" , whereas Alvin meant it as "looks like a freeze"...
– Fabby
Dec 21 '18 at 8:21
1
@AlvinLiang: Please don't forget to also give the OP a clue on how to get out of the situation he's in, not just explain what's happening... ;-)
– Fabby
Dec 21 '18 at 8:25
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1103497%2flack-of-memory-and-need-to-work-on-swap%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Many people do not understand the nature of swap: it's very slow!
For an old machine with DDR3 1600 memory:
- the memory transfer rate is 12800 MB/s,
- a HDD rate is around 100-200 MB/s,
- a SSD rate is maximum 600 MB/s
So if the memory pressure is so high that swap usage is frequent, everything will still work, but will slow down tremendously because the speed of swap is less than 1/1000 of the normal memory.
Where swap can help us in daily life is that if you're running multiple programs, less frequently used program can be swapped out but are still retained in the system. You wait 2-3 minutes to allow less active pages to go to swap, then you can use your current Application without much pain. And in many cases the less active pages never swap back again so there's no further penalty.
But when you talk about simulation, which means your data is huge and swap in/out activities will be frequent, it just looks like your system is freezing, because more than 99.9% of the CPU time is in uninterruptible iowait.
So the solution to your problems is:
- Buy more RAM
- Have tremendous patience and wait 1000 times longer with your current setup
- Add an SSD and still have a lot of patience and wait 100 times longer...
2
I'm not sure I agree that "freezing is the normal behavior", and that it "doesn't help to tune your swap". Between tuning applications vs physical RAM vs swap size/settings, there are things that can be done to improve the status quo.
– heynnema
Dec 21 '18 at 3:27
Well, it depends how much memory he's using for simulator. But when swap is activating heavily, system will be slow to nearly freezed, that is for sure.
– Alvin Liang
Dec 21 '18 at 3:35
1
The OP's script that edits a 8G text file in RAM is very suspect from a performance and swapping standpoint. Many modern computers with SSD make swapping almost a non-issue. But as my comment to the OP indicates, they need more RAM, if they change nothing else.
– heynnema
Dec 21 '18 at 3:37
Alvin An edit and an upvote! ;-) @heynnema have a look now. His basic idea is good, just the "freezing" part was incorrect as you and me see it as "sigstop" , whereas Alvin meant it as "looks like a freeze"...
– Fabby
Dec 21 '18 at 8:21
1
@AlvinLiang: Please don't forget to also give the OP a clue on how to get out of the situation he's in, not just explain what's happening... ;-)
– Fabby
Dec 21 '18 at 8:25
add a comment |
Many people do not understand the nature of swap: it's very slow!
For an old machine with DDR3 1600 memory:
- the memory transfer rate is 12800 MB/s,
- a HDD rate is around 100-200 MB/s,
- a SSD rate is maximum 600 MB/s
So if the memory pressure is so high that swap usage is frequent, everything will still work, but will slow down tremendously because the speed of swap is less than 1/1000 of the normal memory.
Where swap can help us in daily life is that if you're running multiple programs, less frequently used program can be swapped out but are still retained in the system. You wait 2-3 minutes to allow less active pages to go to swap, then you can use your current Application without much pain. And in many cases the less active pages never swap back again so there's no further penalty.
But when you talk about simulation, which means your data is huge and swap in/out activities will be frequent, it just looks like your system is freezing, because more than 99.9% of the CPU time is in uninterruptible iowait.
So the solution to your problems is:
- Buy more RAM
- Have tremendous patience and wait 1000 times longer with your current setup
- Add an SSD and still have a lot of patience and wait 100 times longer...
2
I'm not sure I agree that "freezing is the normal behavior", and that it "doesn't help to tune your swap". Between tuning applications vs physical RAM vs swap size/settings, there are things that can be done to improve the status quo.
– heynnema
Dec 21 '18 at 3:27
Well, it depends how much memory he's using for simulator. But when swap is activating heavily, system will be slow to nearly freezed, that is for sure.
– Alvin Liang
Dec 21 '18 at 3:35
1
The OP's script that edits a 8G text file in RAM is very suspect from a performance and swapping standpoint. Many modern computers with SSD make swapping almost a non-issue. But as my comment to the OP indicates, they need more RAM, if they change nothing else.
– heynnema
Dec 21 '18 at 3:37
Alvin An edit and an upvote! ;-) @heynnema have a look now. His basic idea is good, just the "freezing" part was incorrect as you and me see it as "sigstop" , whereas Alvin meant it as "looks like a freeze"...
– Fabby
Dec 21 '18 at 8:21
1
@AlvinLiang: Please don't forget to also give the OP a clue on how to get out of the situation he's in, not just explain what's happening... ;-)
– Fabby
Dec 21 '18 at 8:25
add a comment |
Many people do not understand the nature of swap: it's very slow!
For an old machine with DDR3 1600 memory:
- the memory transfer rate is 12800 MB/s,
- a HDD rate is around 100-200 MB/s,
- a SSD rate is maximum 600 MB/s
So if the memory pressure is so high that swap usage is frequent, everything will still work, but will slow down tremendously because the speed of swap is less than 1/1000 of the normal memory.
Where swap can help us in daily life is that if you're running multiple programs, less frequently used program can be swapped out but are still retained in the system. You wait 2-3 minutes to allow less active pages to go to swap, then you can use your current Application without much pain. And in many cases the less active pages never swap back again so there's no further penalty.
But when you talk about simulation, which means your data is huge and swap in/out activities will be frequent, it just looks like your system is freezing, because more than 99.9% of the CPU time is in uninterruptible iowait.
So the solution to your problems is:
- Buy more RAM
- Have tremendous patience and wait 1000 times longer with your current setup
- Add an SSD and still have a lot of patience and wait 100 times longer...
Many people do not understand the nature of swap: it's very slow!
For an old machine with DDR3 1600 memory:
- the memory transfer rate is 12800 MB/s,
- a HDD rate is around 100-200 MB/s,
- a SSD rate is maximum 600 MB/s
So if the memory pressure is so high that swap usage is frequent, everything will still work, but will slow down tremendously because the speed of swap is less than 1/1000 of the normal memory.
Where swap can help us in daily life is that if you're running multiple programs, less frequently used program can be swapped out but are still retained in the system. You wait 2-3 minutes to allow less active pages to go to swap, then you can use your current Application without much pain. And in many cases the less active pages never swap back again so there's no further penalty.
But when you talk about simulation, which means your data is huge and swap in/out activities will be frequent, it just looks like your system is freezing, because more than 99.9% of the CPU time is in uninterruptible iowait.
So the solution to your problems is:
- Buy more RAM
- Have tremendous patience and wait 1000 times longer with your current setup
- Add an SSD and still have a lot of patience and wait 100 times longer...
edited Dec 21 '18 at 8:23
Fabby
26.5k1360159
26.5k1360159
answered Dec 21 '18 at 2:47
Alvin Liang
6618
6618
2
I'm not sure I agree that "freezing is the normal behavior", and that it "doesn't help to tune your swap". Between tuning applications vs physical RAM vs swap size/settings, there are things that can be done to improve the status quo.
– heynnema
Dec 21 '18 at 3:27
Well, it depends how much memory he's using for simulator. But when swap is activating heavily, system will be slow to nearly freezed, that is for sure.
– Alvin Liang
Dec 21 '18 at 3:35
1
The OP's script that edits a 8G text file in RAM is very suspect from a performance and swapping standpoint. Many modern computers with SSD make swapping almost a non-issue. But as my comment to the OP indicates, they need more RAM, if they change nothing else.
– heynnema
Dec 21 '18 at 3:37
Alvin An edit and an upvote! ;-) @heynnema have a look now. His basic idea is good, just the "freezing" part was incorrect as you and me see it as "sigstop" , whereas Alvin meant it as "looks like a freeze"...
– Fabby
Dec 21 '18 at 8:21
1
@AlvinLiang: Please don't forget to also give the OP a clue on how to get out of the situation he's in, not just explain what's happening... ;-)
– Fabby
Dec 21 '18 at 8:25
add a comment |
2
I'm not sure I agree that "freezing is the normal behavior", and that it "doesn't help to tune your swap". Between tuning applications vs physical RAM vs swap size/settings, there are things that can be done to improve the status quo.
– heynnema
Dec 21 '18 at 3:27
Well, it depends how much memory he's using for simulator. But when swap is activating heavily, system will be slow to nearly freezed, that is for sure.
– Alvin Liang
Dec 21 '18 at 3:35
1
The OP's script that edits a 8G text file in RAM is very suspect from a performance and swapping standpoint. Many modern computers with SSD make swapping almost a non-issue. But as my comment to the OP indicates, they need more RAM, if they change nothing else.
– heynnema
Dec 21 '18 at 3:37
Alvin An edit and an upvote! ;-) @heynnema have a look now. His basic idea is good, just the "freezing" part was incorrect as you and me see it as "sigstop" , whereas Alvin meant it as "looks like a freeze"...
– Fabby
Dec 21 '18 at 8:21
1
@AlvinLiang: Please don't forget to also give the OP a clue on how to get out of the situation he's in, not just explain what's happening... ;-)
– Fabby
Dec 21 '18 at 8:25
2
2
I'm not sure I agree that "freezing is the normal behavior", and that it "doesn't help to tune your swap". Between tuning applications vs physical RAM vs swap size/settings, there are things that can be done to improve the status quo.
– heynnema
Dec 21 '18 at 3:27
I'm not sure I agree that "freezing is the normal behavior", and that it "doesn't help to tune your swap". Between tuning applications vs physical RAM vs swap size/settings, there are things that can be done to improve the status quo.
– heynnema
Dec 21 '18 at 3:27
Well, it depends how much memory he's using for simulator. But when swap is activating heavily, system will be slow to nearly freezed, that is for sure.
– Alvin Liang
Dec 21 '18 at 3:35
Well, it depends how much memory he's using for simulator. But when swap is activating heavily, system will be slow to nearly freezed, that is for sure.
– Alvin Liang
Dec 21 '18 at 3:35
1
1
The OP's script that edits a 8G text file in RAM is very suspect from a performance and swapping standpoint. Many modern computers with SSD make swapping almost a non-issue. But as my comment to the OP indicates, they need more RAM, if they change nothing else.
– heynnema
Dec 21 '18 at 3:37
The OP's script that edits a 8G text file in RAM is very suspect from a performance and swapping standpoint. Many modern computers with SSD make swapping almost a non-issue. But as my comment to the OP indicates, they need more RAM, if they change nothing else.
– heynnema
Dec 21 '18 at 3:37
Alvin An edit and an upvote! ;-) @heynnema have a look now. His basic idea is good, just the "freezing" part was incorrect as you and me see it as "sigstop" , whereas Alvin meant it as "looks like a freeze"...
– Fabby
Dec 21 '18 at 8:21
Alvin An edit and an upvote! ;-) @heynnema have a look now. His basic idea is good, just the "freezing" part was incorrect as you and me see it as "sigstop" , whereas Alvin meant it as "looks like a freeze"...
– Fabby
Dec 21 '18 at 8:21
1
1
@AlvinLiang: Please don't forget to also give the OP a clue on how to get out of the situation he's in, not just explain what's happening... ;-)
– Fabby
Dec 21 '18 at 8:25
@AlvinLiang: Please don't forget to also give the OP a clue on how to get out of the situation he's in, not just explain what's happening... ;-)
– Fabby
Dec 21 '18 at 8:25
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1103497%2flack-of-memory-and-need-to-work-on-swap%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What is your output of
free
command?– Alvin Liang
Dec 21 '18 at 2:13
Read
man swapon
– waltinator
Dec 21 '18 at 2:27
1
The applications you use for simulation may need more RAM. Swaps primary purpose is to hold memory pages that are not immediately needed, which should free up RAM for new processes. Aside from getting larger RAM sticks, consider tuning your system - see askubuntu.com/q/2194/295286 . I'd say decrease number of services you have starting on boot, use lighter desktop ( if you use any ), consider parallelizing tasks, try to limit resources for certain processes
– Sergiy Kolodyazhnyy
Dec 21 '18 at 3:08
1
The bottom line is this... upgrade your memory. Your
free -h
command shows no swap usage, but you may have used that command when nothing was going on. Sure, you could play with various settings likevm.swappiness
, but it wouldn't change the fact that you need more physical RAM. You could also change your script to only read in portions of the text file, so that it doesn't use all of your existing RAM.– heynnema
Dec 21 '18 at 3:18
I think buy an SSD will improve text file editing throughput scenario the most. When text file reading and swap activating happens at the same time, it will not help you finish the task any quicker.
– Alvin Liang
Dec 21 '18 at 3:53