Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jan 28, 2011 7:36 am 
Offline
Senior Newbie

Joined: Wed Oct 27, 2010 8:50 pm
Posts: 8
Hello;
I do not believe this is a repost; I have searched for quite a while before deciding to post. However, if it is, I am sorry.
I have read numerous threads about how to optimize your server, etc;
My question is much simpler:
I have got a linode; I am using it for testing purposes, but plan to use it to host professional websites soon enough.
Thing is, each time I ask a client to log in to test her/his website, I get email notifications about disk IO.
The figures are:
Your Linode, linode70211, has exceeded the notification threshold (1000) for disk io rate by averaging 6567.32 for the last 2 hours.
Your Linode, linode70211, has exceeded the notification threshold (1000) for disk io rate by averaging 11201.09 for the last 2 hours.
Your Linode, linode70211, has exceeded the notification threshold (1000) for disk io rate by averaging 10755.45 for the last 2 hours.
And so on.
So pretty high numbers.
Thing is, I have no idea how high. I have no idea of what is considered acceptable disk IO ratio.
So that is question 1:
What is an acceptable disk IO?

Since the email threshold by default in Linode config is 1000, I guess 10000 is extremely high (tenfolds the default!).
And you must remember these figures result from one person only. No one knows the server exists. Ok, I figure some robots might enter, but no humans.
Oh, and also, I am serving almost pure html. No database, no xml, just html/js and a pinch of php for some easy basic operations.
In other words, I guess the server is absolutely not usable in a real-case scenario. Am I wrong?
Which leads me to question 2:
Is there any way I can optimize my linode so I can use it professionally (host several drupal sites, have a few thousand of users, etc)?
Is it even worth it to optimize?

Thanks in advance


Top
   
 Post subject:
PostPosted: Fri Jan 28, 2011 7:54 am 
Offline

Joined: Fri Jan 28, 2011 7:47 am
Posts: 1
Hi,

Something is forcing your linode into quite extreme disk usage. This can be for a number of reasons, all because of a quite unhealthy setup.

One of the main things to consider is whether or not your linode is doing extreme amounts of swapping.
Check what amount of memory you have free with the command "free".

It should give an output similar to this:
Code:
             total       used       free     shared    buffers     cached
Mem:       2047728      64104    1983624          0       2164      21248
-/+ buffers/cache:      40692    2007036
Swap:       524284          0     524284


As you can see, I'm using almost no memory, and no swap at all.
Checking this is a good place to start - swapping isn't healthy in this sort of environment.

And, even if this isn't the cause, there is something fundamentally wrong with your setup - it should never have this high I/O, and even the smallest linode should handle the job you require x10 with ease.


Top
   
 Post subject:
PostPosted: Fri Jan 28, 2011 8:54 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Also try installing iotop it'll tell you what's using your io

_________________
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 Jan 28, 2011 2:03 pm 
Offline
Senior Newbie

Joined: Wed Oct 27, 2010 8:50 pm
Posts: 8
Thanks for helping.

This what free outputs:
Code:
             total       used       free     shared    buffers     cached
Mem:        510652     299760     210892          0        652      10676
-/+ buffers/cache:     288432     222220
Swap:       262136      55600     206536


I installed iotop;
And this worried me during install:
"Processing triggers for man-db ...
/usr/bin/mandb: can't write to /var/cache/man/8588: No space left on device"

So I checked space left: 0%

I was, to say the least, puzzled. I am supposed to have 16Gigs, of which a good chunk is taken by buntu, but all the rest is just a few php/html/js files and a few low-res images.

I quickly cleaned apt cache because the system was being extremely unresponsive.

so i tried to sniff around; my apache log files in var/log/apache2 were takin up 4gigs. Is that normal?

my /home/ is on another drive so that's not it.

So now my problem is: What is takin up my space?


Top
   
 Post subject:
PostPosted: Fri Jan 28, 2011 2:44 pm 
Online
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
4GB of logs is quite a bit. Is that in a single log that you're not rotating? I would suggest putting in logrotate if you don't have it already.


Top
   
 Post subject:
PostPosted: Fri Jan 28, 2011 4:19 pm 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
du -m / | sort -n | head
And well, huge apache logs may happen, especially if you become a target of a botnet.
That's one of the reasons why keeping /var/log on a separate partition may be a good idea - to prevent those from filling the whole disk.
And yes, my Linode suffered from that too, tho it wasn't my code update which caused the errorlog to GROW...

_________________
rsk, providing useless advice on the Internet since 2005.


Top
   
 Post subject:
PostPosted: Fri Jan 28, 2011 7:03 pm 
Offline
Senior Newbie

Joined: Wed Oct 27, 2010 8:50 pm
Posts: 8
Ok, this is the output from du:
Code:
du: cannot access `/proc/20018/task/20020/fd/28': No such file or directory
du: cannot access `/proc/20359/task/20359/fdinfo/71': No such file or directory
du: cannot access `/proc/20411/task/20411/fd/163': No such file or directory
du: cannot access `/proc/20411/task/20414/fd/30': No such file or directory
du: cannot access `/proc/20456/task/20468/fd/148': No such file or directory
du: cannot access `/proc/20457/fdinfo/138': No such file or directory
du: cannot access `/proc/20476/task/20476/fd/4': No such file or directory
du: cannot access `/proc/20476/task/20476/fdinfo/4': No such file or directory
du: cannot access `/proc/20476/fd/4': No such file or directory
du: cannot access `/proc/20476/fdinfo/4': No such file or directory
0   /dev/block
0   /dev/char
0   /dev/disk
0   /dev/disk/by-path
0   /dev/disk/by-uuid
0   /dev/input
0   /dev/mapper
0   /dev/net
0   /dev/pts
0   /dev/shm


I have the feeling this is not normal.
I am thinking of just wiping my partition clean and do a fresh install of ubuntu.
[edit] but then I would be ever frustrated because I would not have solved the mystery


Top
   
 Post subject:
PostPosted: Fri Jan 28, 2011 8:04 pm 
Offline
Senior Member

Joined: Sat Jun 05, 2004 12:49 am
Posts: 333
That's normal.

Those processes probably exited between du getting a directory listing and being able to process it.

The /dev subsystem is special, those generally dont take up hard-drive space they're just mappings.


Top
   
 Post subject:
PostPosted: Fri Jan 28, 2011 8:36 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Use du -m / | sort -n -r | head to sort by descending size.

_________________
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 Jan 28, 2011 8:37 pm 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
Try
Code:
sudo du -m --max-depth 1 / | sort -n


Top
   
 Post subject:
PostPosted: Sat Jan 29, 2011 8:23 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
obs wrote:
Use du -m / | sort -n -r | head to sort by descending size.

Whoops >.>; sorry... (well, | tail witohut reverse sort would work too... either way, I screwed up :P)

_________________
rsk, providing useless advice on the Internet since 2005.


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