Community discussions

MikroTik App
 
drusha
just joined
Topic Author
Posts: 14
Joined: Sun Mar 14, 2010 3:13 am

KVM and possible memory leak

Tue Nov 04, 2014 12:37 am

Dear All!

Back in June of 2013 I've noticed that version 6.X has some sort of memory leak (Ticket#2013061166000928 if someone needs), and I would like to rise this topic again.
As far as I know, the leakage is related to KVM guest's network activity and/or guest's CPU load. Please see the attachment below. I thought that it is some sort of caching feature but system always hangs at some point (not instantly) when all memory is eaten up and watchdog doesn't help (I believe it is useless on x86?). Does anyone else experiences the same behavior? Could you please confirm it?

my test system is:
x86 with core2quad Q6600
2GB ram
ROS is installed on a new 1TB SATA WD drive
one KVM guest with only 256MB allocated for Debian 7
You do not have the required permissions to view the files attached to this post.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: KVM and possible memory leak

Tue Nov 04, 2014 10:57 am

can you confirm that memory actually fills up?
 
drusha
just joined
Topic Author
Posts: 14
Joined: Sun Mar 14, 2010 3:13 am

Re: KVM and possible memory leak

Fri Nov 07, 2014 6:14 am

can you confirm that memory actually fills up?
Actually not. It always stays at ~85% of the whole amount. Also, at the beginning, it shows less consumption than it should be, i.e. KVM guest has 1024 MB of dedicated memory, but ROS shows that only 400 MB is consumed, then it grows and goes over 1024 and beyond. Maybe, it is some sort of compression?
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: KVM and possible memory leak

Fri Nov 07, 2014 9:00 am

it looks like this is quirk how mostly windows users that see Linux memory usage - linux reports everything that is taking up the RAM - cache, hdd file cache etc. while windows does not do that.

It very much seems like that is the case.
 
drusha
just joined
Topic Author
Posts: 14
Joined: Sun Mar 14, 2010 3:13 am

Re: KVM and possible memory leak

Fri Nov 07, 2014 9:16 am

I could agree on that, if it wouldn't be the KVM case only. Why then Linux doesn't show high cache consumption when KVM is not running? There is a lot of network (100/100mbit 80 users) and disk activity (ftp & samba) happening on my system without KVM, but only KVM's guests actions/data are being cached?

PS: heh, just checked my first message - yes, I've mentioned that "I thought that it is some sort of caching feature" :D
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: KVM and possible memory leak

Fri Nov 07, 2014 9:27 am

how large is KVM image file? How it compares to a size of the RAM?
 
drusha
just joined
Topic Author
Posts: 14
Joined: Sun Mar 14, 2010 3:13 am

Re: KVM and possible memory leak

Fri Nov 07, 2014 11:13 am

Right now the file is 16.8GB big. It is in qcow2 format, and may grow to 915GB. RAM available for ROS is 2GB. So the current file is 8 times bigger than the RAM amount.

Who is online

Users browsing this forum: No registered users and 33 guests