Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Feb 28, 2005 8:07 pm 
Offline
Senior Member

Joined: Fri Feb 18, 2005 4:09 pm
Posts: 594
I'm relatively new to Linode, and see the load on host34 going
over 5 with regular frequency, and over 10 or 12 at times. Is this
the normal load on a Linode server? It seems excessive, and my
Python scripts are running much slower that I had anticipated.

When this happens AFAIK I can't get the 1/20th of a server
minimum I understood was the least I would receive from a
Linode. I cannot tell if host34 is a dual CPU server, certainly
if it is not then making it one should be seriously considered IMHO.

Is User Mode Linux so new that it still has wrinkles to be worked out?

James Phillips
http://zunzun.com on host34


Top
   
 Post subject:
PostPosted: Mon Feb 28, 2005 8:13 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
cat /proc/swaps might be a good place to start:

Code:
Filename                     Type            Size    Used    Priority
/dev/ubd/1                      partition       525304  204996  -1

That's over 200M in swap!

-Chris


Top
   
 Post subject:
PostPosted: Mon Feb 28, 2005 8:56 pm 
Offline
Senior Member

Joined: Fri Feb 18, 2005 4:09 pm
Posts: 594
So, when I want to see host34's load I should look at the amount
of swap space used on my linode? That doesn't make sense to me.
I have been using the load average on the first line of output from
the top command, which can show high load factors even when my
apparent CPU usage is very low. I thought swap space was related
to memory usage - is that incorrect? I'm no Joe Linux so it could be.

James Phillips, newbie at large
http://zunzun.com


Top
   
 Post subject:
PostPosted: Mon Feb 28, 2005 9:03 pm 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
Swap usage means disk usage. Every time a page gets swapped back into (or out of) RAM, you're using I/O.

I/O is one of the scarce resources on Linode, much scarcer than CPU. Caker has implemented a token scheme to make I/O fair. You can check you statistics by examining /proc/io_status.

When a process on Linux is blocked waiting for I/O, it takes up a full 1.0 on the CPU usage. That's why, I believe, you're seeing high "CPU load".


Top
   
 Post subject:
PostPosted: Mon Feb 28, 2005 9:06 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
"loadavg" and "top" inside your Linode give the load of your Linode itself. When you see a high loadavg, it usually means processes are blocked, waiting for the disk. Each process blocked adds 1 to loadavg.

Having so much in swap means you're over-extending the memory of your Linode itself, causing much of the processes you are running to swap out to disk.

You should investigate placing limits on Apache threads and memory usage, mysql's memory usage, etc.

-Chris


Top
   
 Post subject:
PostPosted: Mon Feb 28, 2005 9:10 pm 
Offline
Senior Member

Joined: Fri Feb 18, 2005 4:09 pm
Posts: 594
Now *there's* advice a Linode newbie like me can sink his teeth
into! Thanks for explaining it to me, that does make sense.

James Phillips
now ju-u-u-st a bit less of a newbie


Top
   
 Post subject:
PostPosted: Tue Mar 01, 2005 7:19 am 
Offline
Senior Member

Joined: Fri Feb 18, 2005 4:09 pm
Posts: 594
[quote="caker"]"loadavg" and "top" inside your Linode give the load of your Linode itself. When you see a high loadavg, it usually means processes are blocked, waiting for the disk. Each process blocked adds 1 to loadavg.[/quote]

I've been watching my Linode now that I understand this. Very
interesting and enlightening, and I can rewrite some of the site
to take the I/O limiting into account with good effect, I think.

May I ask why token_max is set to 20000 on my linode? From
what I gather poking around on the forums, it is because of the
swap size on my linode - is that correct? If so, reducing swap
usage should bump this number up?

James Phillips


Top
   
 Post subject:
PostPosted: Tue Mar 01, 2005 10:57 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
zunzun wrote:
May I ask why token_max is set to 20000 on my linode? From what I gather poking around on the forums, it is because of the swap size on my linode - is that correct? If so, reducing swap usage should bump this number up?


Low token_max is down to excessive disk i/o usage, so your problem has been swap usage, not swap size per se.

I don't think upward changes to token_max occur automatically. When I got into the situation you're in now, I had to raise a ticket to get caker to set my token_max back to the original value.

The defaults are token_refill=512 and token_max=400000.

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Wed Mar 02, 2005 12:09 am 
Offline
Junior Member

Joined: Tue Jan 25, 2005 10:45 pm
Posts: 33
My understanding is if you reboot you will get your io tokens back...


Top
   
 Post subject:
PostPosted: Wed Mar 02, 2005 12:14 am 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
Really? I was in that situation recently and got Caker to bail me out. I didn't try rebooting, though; that would be much easier! If it works please post here.


Top
   
 Post subject:
PostPosted: Wed Mar 02, 2005 9:56 am 
Offline
Junior Member

Joined: Fri Jun 25, 2004 10:31 am
Posts: 27
This is true when you shutdown and reboot your linode you IO is nolonger being used so it would go back up. Chris CAN give you a higher IO_MAX and ip_Refill rate for temp. if you have a good reason he has for me in the past


Top
   
 Post subject:
PostPosted: Wed Mar 02, 2005 10:24 am 
Offline
Senior Member

Joined: Fri Feb 18, 2005 4:09 pm
Posts: 594
Well, Linode support was certainly kind and increased token_max
when I asked in a support ticket. I was asked not to thrash the
hard drive on host34 else it would have to be reduced, and this
seems perfectly reasonable.

I am curious about Gentoo re-syncing and updating: my guess
is that the host would be least busy on a Sunday, so that would
be the best time for this. It would likely make for a good bit of
swap space usage though. Any recommendations?

James Phillips


Top
   
 Post subject:
PostPosted: Wed Mar 02, 2005 10:51 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
zunzun wrote:
I am curious about Gentoo re-syncing and updating: my guess is that the host would be least busy on a Sunday, so that would be the best time for this. It would likely make for a good bit of
swap space usage though. Any recommendations?

I run Gentoo on a Linode 64 (stage 1 install, not caker's distro) and I have only run into trouble (too much swapping - token_max and token_refill reduced - Linode slowed to a crawl) when linking glibc. I still had all my other services running at the same time (a little light apache, postfix and courier-imap) so I was being a bit greedy. This has been discussed here, and the advice from that discussion was to change your /etc/make.conf:
Code:
MAKEOPTS="-j1"

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Wed Mar 02, 2005 1:31 pm 
Offline
Senior Member

Joined: Fri Feb 18, 2005 4:09 pm
Posts: 594
I'll try the "-j1" this weekend on my Gentoo sync and check it.
Thank you for the advice.

James Phillips


Top
   
 Post subject:
PostPosted: Wed Mar 02, 2005 4:51 pm 
Offline
Senior Member

Joined: Fri Aug 06, 2004 5:49 pm
Posts: 158
zunzun wrote:
It would likely make for a good bit of
swap space usage though. Any recommendations?


If possible, it's also a good idea with Gentoo to shutdown as many services as possible during updates. If you have a 64, you'll want at least 20-25MB of ram free before starting your updates. It's less of a problem on a 96 depending on what your running. Just remember, the more ram you have free, the less your Linode needs to dip into swap, and the less I/O it's actually going to do copying pages from ram to swap and back.


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


Who is online

Users browsing this forum: No registered users 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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group