store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Wed May 22, 2013 12:20 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 6 posts ] 
Author Message
 Post subject: Swap utilization - ram overused ?
Unread postPosted: Thu Apr 14, 2011 5:29 am 
Offline
Forum Regular
Forum Regular

Joined: Sun Mar 29, 2009 6:52 pm
Posts: 348
I have a box with 1 gigabyte of ram. Currently it is not in use by users.
There is a mysql running on it with just the db of ossec, httpd and very very basic services. if you exclude the asl running (and clamav) 10 services to be accurate. The box has 1 gigabyte of ram. asl-httpd is shut down.

It uses so much ram that it even pulls around 30 mbytes of swap !!! Is this normal ? Why do we have so much ram usage ?
It can't even be accessed by wan so its not an attack that causes ram usage for some reason.
Before installing asl there was at least 500mbytes of free ram. That being the worst case.
Is there something we can do to optimize this ?

_________________
Hello IT.
Phone : Blah Blah ....
Have you tried turning it on and off again ?
Phone : Blah Blah ....
....
I'm sorry, are you from the Past ?!
http://www.youtube.com/watch?v=-E4fm4Wqego


Top
 Profile  
 
 Post subject: Re: Swap utilization - ram overused ?
Unread postPosted: Thu Apr 14, 2011 8:18 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7425
Location: earth
those could just be anonymous mappings; eg data that does not map to a file. Certain apps like mysql will write anonymous mappings to swap like that, its nothing unusual. I have 16G in my laptop for example and this moment it hasnt touched about 10G of that, swap is at 13M.


Top
 Profile  
 
 Post subject: Re: Swap utilization - ram overused ?
Unread postPosted: Thu Apr 14, 2011 2:02 pm 
Offline
Forum Regular
Forum Regular

Joined: Sun Mar 29, 2009 6:52 pm
Posts: 348
scott wrote:
those could just be anonymous mappings; eg data that does not map to a file. Certain apps like mysql will write anonymous mappings to swap like that, its nothing unusual. I have 16G in my laptop for example and this moment it hasnt touched about 10G of that, swap is at 13M.


wow. I thought swap is the last memory that a system will use after ram has been full. Using swap is bad right ?
It makes the system slow... ? So why does it use swap ?

PS : Cool laptop !!! I had 6GB on mine and thought it was too much until 2 mins ago :P

_________________
Hello IT.
Phone : Blah Blah ....
Have you tried turning it on and off again ?
Phone : Blah Blah ....
....
I'm sorry, are you from the Past ?!
http://www.youtube.com/watch?v=-E4fm4Wqego


Top
 Profile  
 
 Post subject: Re: Swap utilization - ram overused ?
Unread postPosted: Thu Apr 14, 2011 10:25 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
That is normal. You may want to read this FAQ about how Linux (and all modern OS kernels) use memory:

https://www.atomicorp.com/wiki/index.ph ... _in_use.3F

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject: Re: Swap utilization - ram overused ?
Unread postPosted: Thu Apr 14, 2011 10:28 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7425
Location: earth
Heh, yeah I have (until recently) the most powerful laptop in the world. The next up beats mine because it has 1 more USB 3.0 port :P And no, its not a mac. I run linux... I'm *actually* cool.

Using swap isn't always a bad thing, its part of garbage collection in modern apps. A few megs here and there is to be expected, large amounts of swap are indicative of too little ram.


Top
 Profile  
 
 Post subject: Re: Swap utilization - ram overused ?
Unread postPosted: Mon Apr 18, 2011 9:44 am 
Offline
Forum Regular
Forum Regular

Joined: Mon Apr 10, 2006 12:55 pm
Posts: 656
I have a new signature now. Thanks Scott!

_________________
"Its not a mac. I run linux... I'm actually cool." - scott


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 6 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group