Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Nov 04, 2011 12:06 pm 
Offline
Newbie

Joined: Thu Nov 03, 2011 5:45 pm
Posts: 2
Hey guys... I've been tweaking my 512 here and there to try to get the best performance for what I am working with.

Whats the best way to see if I am using to much memory or to its resulting in swap usage? I pasted a few things below... I noticed when checking the vmstat there is some swap usage, but why would there be when there seemed to be some free memory (in cache), this is what gets dumped first if there is need for memory correct?

Is there anything else I should be monitoring to see if I'm using swap? (If you have time, based on what you see below, do I have enough free memory to allow mysql a bit more memory room ?)

Thanks for the help in advance, just need some better clarification on what exactly I should be watching.

free -m

Code:

             total       used       free     shared    buffers     cached
Mem:           497        487          9          0          7        254
-/+ buffers/cache:        226        270
Swap:         1023         86        937



vmstat 1 20

Code:

procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0  84616  36668   7272 254396    3    2     8     7   12   10  2  1 97  0
 0  0  84616  36668   7276 254420    0    0     8     0  382  116  0  0 99  0
 0  0  84600  40896   7276 254424    0    0     0     0  219   50  0  0 100  0
 0  0  84600  41392   7280 254420    0    0    16    48  639  168  1  0 98  1
 0  0  84600  41384   7288 254432    0    0     0   152  647  211  0  1 92  6
 2  0  84536  35208   7288 254452  112    0   192     0 1836  885  5  2 91  2
 1  1  84456  32960   7336 255260  108    0   744   180 1746  655  4  2 89  5
 0  0  84448  33332   7336 255364   12    0   144     0 1024  558  1  1 97  1
 0  0  84448  33580   7344 255304   32    0    40   356  588  211  1  0 99  0
 0  0  84392  38060   7344 255336    4    0     4    20  530  171  0  0 99  0
 0  0  84328  37952   7344 255448   64    0   112     0 1210  523  3  1 95  0
 0  0  84328  37952   7344 255448    0    0     0     0   84   23  0  0 100  0
 0  0  84328  44780   7344 255448    0    0     0     0  111   23  0  0 100  0
 1  0  84328  50484   7348 255444    0    0     0   428  166   45  0  0 100  0
 1  0  84264  45340   7348 255480   36    0    36    40 1252  481  2  1 96  0
 1  0  84264  47448   7348 255516    0    0     0     0  607  250  2  0 98  0
 0  0  84264  47448   7348 255520    0    0     0     0  345  157  0  0 99  0
 0  0  84264  47324   7348 255520    0    0     0     0  654  274  3  1 97  0
 1  0  84264  42364   7348 255544    0    0    28    20  744  249  3  1 96  0
 0  0  84264  47936   7356 255584    0    0    32   132 1111  239  1  1 94  4


top

Code:

top - 12:02:05 up 2 days, 14:09,  1 user,  load average: 0.03, 0.12, 0.13
Tasks: 136 total,   1 running, 135 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.7%us,  0.6%sy,  0.0%ni, 97.2%id,  0.4%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    509084k total,   452264k used,    56820k free,     7544k buffers
Swap:  1048572k total,    83292k used,   965280k free,   258640k cached

_________________
Thanks,
- John


Top
   
 Post subject:
PostPosted: Fri Nov 04, 2011 12:36 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Install munin it generates graphs for just about anything you want so you can see your resource usage over time.

Regarding swap, swap is good, swapping is bad. Swap takes things that aren't used a lot out of memory freeing it up for something useful. Swapping is when things go in and out of swap, this is bade since it's slow and if you're swapping a lot your server will crawl and die. Munin can show your swap in/out per day,week and month if you see it starting to spike then you need to look into why.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Fri Nov 04, 2011 9:15 pm 
Offline
Newbie

Joined: Thu Nov 03, 2011 5:45 pm
Posts: 2
Thanks for the rely.

I understand that swapping is bad. I'll check out munin as well. Is there anything else I should monitor to see if things are using swap?

_________________
Thanks,

- John


Top
   
 Post subject: Over time?
PostPosted: Wed Nov 16, 2011 11:56 am 
Offline
Junior Member
User avatar

Joined: Wed Nov 16, 2011 11:41 am
Posts: 37
Website: http://empoweringmedia.com
Location: United States
Over time you should be using Cacti and for alerts nagios.

_________________
Larry Ludwig
Empowering Media
Managed Cloud Services and Managed VPS


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group