Is there a way of limiting the Kernel's memory manager to use only 75% of memory?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








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... :-(






share|improve this question






















  • 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














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... :-(






share|improve this question






















  • 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












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... :-(






share|improve this question














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... :-(








share|improve this question













share|improve this question




share|improve this question








edited May 3 at 21:38

























asked May 3 at 20:24









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
















  • 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










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





share|improve this answer




















  • 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










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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















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






























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





share|improve this answer




















  • 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














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





share|improve this answer




















  • 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












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





share|improve this answer












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






share|improve this answer












share|improve this answer



share|improve this answer










answered May 3 at 23:51









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
















  • 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












 

draft saved


draft discarded


























 


draft saved


draft discarded














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













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491