Is there a way of limiting the Kernel's memory manager to use only 75% of memory?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
2
down vote
favorite
OK, here the premise: Customer is a Windows shop and their Ubuntu VMs always use 100% of their allocated memory (as per design) so they show up in "Red" on the memory usage charts. As we don't have access inside the VMs, the memory usage is measured externally by VMWare and Googling didn't give me any more insight as what I want to do is stupid.
It's also political:Â I've told them already that this is by design, the machines do not use much swap and removing the Ubuntu VMs from the report is not feasible, nor is setting the memory reporting limit to 100% and monitoring swap usage only as some sales guy accepted these KPIs in the contract, but unfortunately that's the info I need to be able to raise a change request with their external provider for these VMs, so posting a question here.
Is there a way of limiting the Kernel's memory manager to use only 75% of available RAM under normal circumstances and only use the remaining 25% when it's really needed? (E.g. for Disk caching)
I'd like the memory still to be available when it's really needed, but I'll take any answer...
What I tried already:
- Allocating a huge RAM disk and not using it: it's still allocated RAM... :-(
kernel vmware ram memory-usage cache
add a comment |Â
up vote
2
down vote
favorite
OK, here the premise: Customer is a Windows shop and their Ubuntu VMs always use 100% of their allocated memory (as per design) so they show up in "Red" on the memory usage charts. As we don't have access inside the VMs, the memory usage is measured externally by VMWare and Googling didn't give me any more insight as what I want to do is stupid.
It's also political:Â I've told them already that this is by design, the machines do not use much swap and removing the Ubuntu VMs from the report is not feasible, nor is setting the memory reporting limit to 100% and monitoring swap usage only as some sales guy accepted these KPIs in the contract, but unfortunately that's the info I need to be able to raise a change request with their external provider for these VMs, so posting a question here.
Is there a way of limiting the Kernel's memory manager to use only 75% of available RAM under normal circumstances and only use the remaining 25% when it's really needed? (E.g. for Disk caching)
I'd like the memory still to be available when it's really needed, but I'll take any answer...
What I tried already:
- Allocating a huge RAM disk and not using it: it's still allocated RAM... :-(
kernel vmware ram memory-usage cache
OK, edited again @pbhj and deleted all my comments so far as this is starting to look like a chat room... ;-)
â Fabby
May 3 at 21:15
1
This makes no sense to me. If they don't want VMs using that much RAM, then why allocate that much to the VMs? What is the hypervisor used for this? Qemu/kvm seems to report it correctly-ish for me on Ubuntu host with Ubuntu guest.
â dobey
May 3 at 21:30
@dobey I've emphasised in the Q that what I want is absolutely stupid, but alas, this is what I need... It's a complex environment and I don't even know where the memory measurement comes from but I'll be able to find out tomorrow-morning.
â Fabby
May 3 at 21:39
I don't think the VM software talks with the OS that's running virtually about virtual RAM usage, so it has no idea which parts of virtual RAM are in use and having Ubuntu use only some of the virtual RAM doesn't let the VM software know that only some of the virtual RAM is used. It thus has to provide all the memory the virtual machine is configured for to avoid unknowingly deleting Ubuntu's memory contents. As an alternative, does this do what you're looking for?
â Chai T. Rex
May 4 at 1:48
@Fabby It's so unlike you to resisting commenting on an answer. Did you miss the one I posted below?
â WinEunuuchs2Unix
May 7 at 23:26
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
OK, here the premise: Customer is a Windows shop and their Ubuntu VMs always use 100% of their allocated memory (as per design) so they show up in "Red" on the memory usage charts. As we don't have access inside the VMs, the memory usage is measured externally by VMWare and Googling didn't give me any more insight as what I want to do is stupid.
It's also political:Â I've told them already that this is by design, the machines do not use much swap and removing the Ubuntu VMs from the report is not feasible, nor is setting the memory reporting limit to 100% and monitoring swap usage only as some sales guy accepted these KPIs in the contract, but unfortunately that's the info I need to be able to raise a change request with their external provider for these VMs, so posting a question here.
Is there a way of limiting the Kernel's memory manager to use only 75% of available RAM under normal circumstances and only use the remaining 25% when it's really needed? (E.g. for Disk caching)
I'd like the memory still to be available when it's really needed, but I'll take any answer...
What I tried already:
- Allocating a huge RAM disk and not using it: it's still allocated RAM... :-(
kernel vmware ram memory-usage cache
OK, here the premise: Customer is a Windows shop and their Ubuntu VMs always use 100% of their allocated memory (as per design) so they show up in "Red" on the memory usage charts. As we don't have access inside the VMs, the memory usage is measured externally by VMWare and Googling didn't give me any more insight as what I want to do is stupid.
It's also political:Â I've told them already that this is by design, the machines do not use much swap and removing the Ubuntu VMs from the report is not feasible, nor is setting the memory reporting limit to 100% and monitoring swap usage only as some sales guy accepted these KPIs in the contract, but unfortunately that's the info I need to be able to raise a change request with their external provider for these VMs, so posting a question here.
Is there a way of limiting the Kernel's memory manager to use only 75% of available RAM under normal circumstances and only use the remaining 25% when it's really needed? (E.g. for Disk caching)
I'd like the memory still to be available when it's really needed, but I'll take any answer...
What I tried already:
- Allocating a huge RAM disk and not using it: it's still allocated RAM... :-(
kernel vmware ram memory-usage cache
edited May 3 at 21:38
asked May 3 at 20:24
![](https://i.stack.imgur.com/Qwl2d.jpg?s=32&g=1)
![](https://i.stack.imgur.com/Qwl2d.jpg?s=32&g=1)
Fabby
24k1352150
24k1352150
OK, edited again @pbhj and deleted all my comments so far as this is starting to look like a chat room... ;-)
â Fabby
May 3 at 21:15
1
This makes no sense to me. If they don't want VMs using that much RAM, then why allocate that much to the VMs? What is the hypervisor used for this? Qemu/kvm seems to report it correctly-ish for me on Ubuntu host with Ubuntu guest.
â dobey
May 3 at 21:30
@dobey I've emphasised in the Q that what I want is absolutely stupid, but alas, this is what I need... It's a complex environment and I don't even know where the memory measurement comes from but I'll be able to find out tomorrow-morning.
â Fabby
May 3 at 21:39
I don't think the VM software talks with the OS that's running virtually about virtual RAM usage, so it has no idea which parts of virtual RAM are in use and having Ubuntu use only some of the virtual RAM doesn't let the VM software know that only some of the virtual RAM is used. It thus has to provide all the memory the virtual machine is configured for to avoid unknowingly deleting Ubuntu's memory contents. As an alternative, does this do what you're looking for?
â Chai T. Rex
May 4 at 1:48
@Fabby It's so unlike you to resisting commenting on an answer. Did you miss the one I posted below?
â WinEunuuchs2Unix
May 7 at 23:26
add a comment |Â
OK, edited again @pbhj and deleted all my comments so far as this is starting to look like a chat room... ;-)
â Fabby
May 3 at 21:15
1
This makes no sense to me. If they don't want VMs using that much RAM, then why allocate that much to the VMs? What is the hypervisor used for this? Qemu/kvm seems to report it correctly-ish for me on Ubuntu host with Ubuntu guest.
â dobey
May 3 at 21:30
@dobey I've emphasised in the Q that what I want is absolutely stupid, but alas, this is what I need... It's a complex environment and I don't even know where the memory measurement comes from but I'll be able to find out tomorrow-morning.
â Fabby
May 3 at 21:39
I don't think the VM software talks with the OS that's running virtually about virtual RAM usage, so it has no idea which parts of virtual RAM are in use and having Ubuntu use only some of the virtual RAM doesn't let the VM software know that only some of the virtual RAM is used. It thus has to provide all the memory the virtual machine is configured for to avoid unknowingly deleting Ubuntu's memory contents. As an alternative, does this do what you're looking for?
â Chai T. Rex
May 4 at 1:48
@Fabby It's so unlike you to resisting commenting on an answer. Did you miss the one I posted below?
â WinEunuuchs2Unix
May 7 at 23:26
OK, edited again @pbhj and deleted all my comments so far as this is starting to look like a chat room... ;-)
â Fabby
May 3 at 21:15
OK, edited again @pbhj and deleted all my comments so far as this is starting to look like a chat room... ;-)
â Fabby
May 3 at 21:15
1
1
This makes no sense to me. If they don't want VMs using that much RAM, then why allocate that much to the VMs? What is the hypervisor used for this? Qemu/kvm seems to report it correctly-ish for me on Ubuntu host with Ubuntu guest.
â dobey
May 3 at 21:30
This makes no sense to me. If they don't want VMs using that much RAM, then why allocate that much to the VMs? What is the hypervisor used for this? Qemu/kvm seems to report it correctly-ish for me on Ubuntu host with Ubuntu guest.
â dobey
May 3 at 21:30
@dobey I've emphasised in the Q that what I want is absolutely stupid, but alas, this is what I need... It's a complex environment and I don't even know where the memory measurement comes from but I'll be able to find out tomorrow-morning.
â Fabby
May 3 at 21:39
@dobey I've emphasised in the Q that what I want is absolutely stupid, but alas, this is what I need... It's a complex environment and I don't even know where the memory measurement comes from but I'll be able to find out tomorrow-morning.
â Fabby
May 3 at 21:39
I don't think the VM software talks with the OS that's running virtually about virtual RAM usage, so it has no idea which parts of virtual RAM are in use and having Ubuntu use only some of the virtual RAM doesn't let the VM software know that only some of the virtual RAM is used. It thus has to provide all the memory the virtual machine is configured for to avoid unknowingly deleting Ubuntu's memory contents. As an alternative, does this do what you're looking for?
â Chai T. Rex
May 4 at 1:48
I don't think the VM software talks with the OS that's running virtually about virtual RAM usage, so it has no idea which parts of virtual RAM are in use and having Ubuntu use only some of the virtual RAM doesn't let the VM software know that only some of the virtual RAM is used. It thus has to provide all the memory the virtual machine is configured for to avoid unknowingly deleting Ubuntu's memory contents. As an alternative, does this do what you're looking for?
â Chai T. Rex
May 4 at 1:48
@Fabby It's so unlike you to resisting commenting on an answer. Did you miss the one I posted below?
â WinEunuuchs2Unix
May 7 at 23:26
@Fabby It's so unlike you to resisting commenting on an answer. Did you miss the one I posted below?
â WinEunuuchs2Unix
May 7 at 23:26
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The only way I can think of is to tell the Kernel 25% of the memory is bad and not to use it.
This Unix & Linux Q&A has excellent instructions. Here is a snippet:
If there's bad RAM at 802M and 807M, you can disable a 10M section of RAM starting at 800M like this:
memmap=10M$800M
Non, didn't miss it: just forgot to upvote... Ping me again Friday and I'll accept if no one else has any bright ideas...
â Fabby
May 8 at 8:13
@Fabby I was more curious on how the project is progressing. Also instead of blacklisting 25% of RAM maybe something like 5% would still make the VM happy?
â WinEunuuchs2Unix
May 8 at 10:37
75% usage is green, 76-90= yellow, >90 is red in the reporting... I'm just helping out a colleague who's being freaked out by this customer.. ;-).
â Fabby
May 8 at 22:15
Support request came back: it's working! I would give you a bounty for that but in the meantime you're a higher rep user than me, so an upvote and an acceptance will have to do! :D
â Fabby
May 9 at 23:07
@Fabby Pffft no bounty needed. I admired that 500 one you got though... GOOD JOB! I'm hoping to turn all these points into a software job at work (get out of the warehouse). AU will be my resume :) In the mean time one girl in the warehouse said my points are all "pointless" :p
â WinEunuuchs2Unix
May 9 at 23:31
 |Â
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The only way I can think of is to tell the Kernel 25% of the memory is bad and not to use it.
This Unix & Linux Q&A has excellent instructions. Here is a snippet:
If there's bad RAM at 802M and 807M, you can disable a 10M section of RAM starting at 800M like this:
memmap=10M$800M
Non, didn't miss it: just forgot to upvote... Ping me again Friday and I'll accept if no one else has any bright ideas...
â Fabby
May 8 at 8:13
@Fabby I was more curious on how the project is progressing. Also instead of blacklisting 25% of RAM maybe something like 5% would still make the VM happy?
â WinEunuuchs2Unix
May 8 at 10:37
75% usage is green, 76-90= yellow, >90 is red in the reporting... I'm just helping out a colleague who's being freaked out by this customer.. ;-).
â Fabby
May 8 at 22:15
Support request came back: it's working! I would give you a bounty for that but in the meantime you're a higher rep user than me, so an upvote and an acceptance will have to do! :D
â Fabby
May 9 at 23:07
@Fabby Pffft no bounty needed. I admired that 500 one you got though... GOOD JOB! I'm hoping to turn all these points into a software job at work (get out of the warehouse). AU will be my resume :) In the mean time one girl in the warehouse said my points are all "pointless" :p
â WinEunuuchs2Unix
May 9 at 23:31
 |Â
show 1 more comment
up vote
1
down vote
accepted
The only way I can think of is to tell the Kernel 25% of the memory is bad and not to use it.
This Unix & Linux Q&A has excellent instructions. Here is a snippet:
If there's bad RAM at 802M and 807M, you can disable a 10M section of RAM starting at 800M like this:
memmap=10M$800M
Non, didn't miss it: just forgot to upvote... Ping me again Friday and I'll accept if no one else has any bright ideas...
â Fabby
May 8 at 8:13
@Fabby I was more curious on how the project is progressing. Also instead of blacklisting 25% of RAM maybe something like 5% would still make the VM happy?
â WinEunuuchs2Unix
May 8 at 10:37
75% usage is green, 76-90= yellow, >90 is red in the reporting... I'm just helping out a colleague who's being freaked out by this customer.. ;-).
â Fabby
May 8 at 22:15
Support request came back: it's working! I would give you a bounty for that but in the meantime you're a higher rep user than me, so an upvote and an acceptance will have to do! :D
â Fabby
May 9 at 23:07
@Fabby Pffft no bounty needed. I admired that 500 one you got though... GOOD JOB! I'm hoping to turn all these points into a software job at work (get out of the warehouse). AU will be my resume :) In the mean time one girl in the warehouse said my points are all "pointless" :p
â WinEunuuchs2Unix
May 9 at 23:31
 |Â
show 1 more comment
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The only way I can think of is to tell the Kernel 25% of the memory is bad and not to use it.
This Unix & Linux Q&A has excellent instructions. Here is a snippet:
If there's bad RAM at 802M and 807M, you can disable a 10M section of RAM starting at 800M like this:
memmap=10M$800M
The only way I can think of is to tell the Kernel 25% of the memory is bad and not to use it.
This Unix & Linux Q&A has excellent instructions. Here is a snippet:
If there's bad RAM at 802M and 807M, you can disable a 10M section of RAM starting at 800M like this:
memmap=10M$800M
answered May 3 at 23:51
![](https://i.stack.imgur.com/2SXNl.jpg?s=32&g=1)
![](https://i.stack.imgur.com/2SXNl.jpg?s=32&g=1)
WinEunuuchs2Unix
35.4k758132
35.4k758132
Non, didn't miss it: just forgot to upvote... Ping me again Friday and I'll accept if no one else has any bright ideas...
â Fabby
May 8 at 8:13
@Fabby I was more curious on how the project is progressing. Also instead of blacklisting 25% of RAM maybe something like 5% would still make the VM happy?
â WinEunuuchs2Unix
May 8 at 10:37
75% usage is green, 76-90= yellow, >90 is red in the reporting... I'm just helping out a colleague who's being freaked out by this customer.. ;-).
â Fabby
May 8 at 22:15
Support request came back: it's working! I would give you a bounty for that but in the meantime you're a higher rep user than me, so an upvote and an acceptance will have to do! :D
â Fabby
May 9 at 23:07
@Fabby Pffft no bounty needed. I admired that 500 one you got though... GOOD JOB! I'm hoping to turn all these points into a software job at work (get out of the warehouse). AU will be my resume :) In the mean time one girl in the warehouse said my points are all "pointless" :p
â WinEunuuchs2Unix
May 9 at 23:31
 |Â
show 1 more comment
Non, didn't miss it: just forgot to upvote... Ping me again Friday and I'll accept if no one else has any bright ideas...
â Fabby
May 8 at 8:13
@Fabby I was more curious on how the project is progressing. Also instead of blacklisting 25% of RAM maybe something like 5% would still make the VM happy?
â WinEunuuchs2Unix
May 8 at 10:37
75% usage is green, 76-90= yellow, >90 is red in the reporting... I'm just helping out a colleague who's being freaked out by this customer.. ;-).
â Fabby
May 8 at 22:15
Support request came back: it's working! I would give you a bounty for that but in the meantime you're a higher rep user than me, so an upvote and an acceptance will have to do! :D
â Fabby
May 9 at 23:07
@Fabby Pffft no bounty needed. I admired that 500 one you got though... GOOD JOB! I'm hoping to turn all these points into a software job at work (get out of the warehouse). AU will be my resume :) In the mean time one girl in the warehouse said my points are all "pointless" :p
â WinEunuuchs2Unix
May 9 at 23:31
Non, didn't miss it: just forgot to upvote... Ping me again Friday and I'll accept if no one else has any bright ideas...
â Fabby
May 8 at 8:13
Non, didn't miss it: just forgot to upvote... Ping me again Friday and I'll accept if no one else has any bright ideas...
â Fabby
May 8 at 8:13
@Fabby I was more curious on how the project is progressing. Also instead of blacklisting 25% of RAM maybe something like 5% would still make the VM happy?
â WinEunuuchs2Unix
May 8 at 10:37
@Fabby I was more curious on how the project is progressing. Also instead of blacklisting 25% of RAM maybe something like 5% would still make the VM happy?
â WinEunuuchs2Unix
May 8 at 10:37
75% usage is green, 76-90= yellow, >90 is red in the reporting... I'm just helping out a colleague who's being freaked out by this customer.. ;-).
â Fabby
May 8 at 22:15
75% usage is green, 76-90= yellow, >90 is red in the reporting... I'm just helping out a colleague who's being freaked out by this customer.. ;-).
â Fabby
May 8 at 22:15
Support request came back: it's working! I would give you a bounty for that but in the meantime you're a higher rep user than me, so an upvote and an acceptance will have to do! :D
â Fabby
May 9 at 23:07
Support request came back: it's working! I would give you a bounty for that but in the meantime you're a higher rep user than me, so an upvote and an acceptance will have to do! :D
â Fabby
May 9 at 23:07
@Fabby Pffft no bounty needed. I admired that 500 one you got though... GOOD JOB! I'm hoping to turn all these points into a software job at work (get out of the warehouse). AU will be my resume :) In the mean time one girl in the warehouse said my points are all "pointless" :p
â WinEunuuchs2Unix
May 9 at 23:31
@Fabby Pffft no bounty needed. I admired that 500 one you got though... GOOD JOB! I'm hoping to turn all these points into a software job at work (get out of the warehouse). AU will be my resume :) In the mean time one girl in the warehouse said my points are all "pointless" :p
â WinEunuuchs2Unix
May 9 at 23:31
 |Â
show 1 more comment
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1031720%2fis-there-a-way-of-limiting-the-kernels-memory-manager-to-use-only-75-of-memory%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
OK, edited again @pbhj and deleted all my comments so far as this is starting to look like a chat room... ;-)
â Fabby
May 3 at 21:15
1
This makes no sense to me. If they don't want VMs using that much RAM, then why allocate that much to the VMs? What is the hypervisor used for this? Qemu/kvm seems to report it correctly-ish for me on Ubuntu host with Ubuntu guest.
â dobey
May 3 at 21:30
@dobey I've emphasised in the Q that what I want is absolutely stupid, but alas, this is what I need... It's a complex environment and I don't even know where the memory measurement comes from but I'll be able to find out tomorrow-morning.
â Fabby
May 3 at 21:39
I don't think the VM software talks with the OS that's running virtually about virtual RAM usage, so it has no idea which parts of virtual RAM are in use and having Ubuntu use only some of the virtual RAM doesn't let the VM software know that only some of the virtual RAM is used. It thus has to provide all the memory the virtual machine is configured for to avoid unknowingly deleting Ubuntu's memory contents. As an alternative, does this do what you're looking for?
â Chai T. Rex
May 4 at 1:48
@Fabby It's so unlike you to resisting commenting on an answer. Did you miss the one I posted below?
â WinEunuuchs2Unix
May 7 at 23:26