Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to figure out what I can do to improve my site's performance.

Specifically:

  • I would like to remove a component and observe over time what the effect of removing that component was on the performance of the site.

  • I would like to have numbers representing the load on the server output periodically (say, every 30 minutes) to a file for the duration of the period that the component is removed.

  • Then I would like to install the component back, and again have load figures output to the file for the period that the component was installed again.

I'm thinking that I can use the sar linux command like this: sar -o /home/myacct/load.txt and have this run as a cron job every 30 minutes.

Will this work, or is there a better way?

share|improve this question

closed as not constructive by Wesley, John Gardeniers, Brent Pabst, mdpc, HopelessN00b Dec 13 '12 at 18:48

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
We would need to know a lot more information. What kind of server, what kind of storage, what kind of application, what kind of load characteristics, etc. and blah. –  Wesley Dec 19 '11 at 1:56
    
Thanks, WesleyDavid. It's a managed VPS, the application is a Wordpress site, the site experiences daily highs and lows (around 20 users at any time). –  Tola Odejayi Dec 19 '11 at 5:19
    
It would be helpful if those who are downvoting this question could let me know why they are doing so. –  Tola Odejayi Dec 19 '11 at 10:13
    
It is an overly broad question that can hardly be answered in its current form. @Mifinni has given the best answer possible. –  Wesley Dec 19 '11 at 16:20
1  
It's not that you're asking in a stupid way, it's more a matter of appropriate subject matter. ServerFault being a place populated by SysAdmins and targetted at SysAdmins, questions that are extremely broad and/or asked from a non SysAdmin standpoint tend to be discouraged. Not because they're bad, but because it's not the venue for those kinds of Qs. Kinda like asking how to sift flour at the Cordon Bleu Institute. Not a bad question, just not asked at the right venue. –  Wesley Dec 19 '11 at 21:07
show 1 more comment

1 Answer

up vote 5 down vote accepted

A better (and more comprehensive) way is to monitor performance stats via SNMP collection and store them in something like MRTG, or the many solutions built on top of RRDTool, or perhaps Nagios.

The snmpd process on the server is what exposes the performance data - CPU, memory, disk IO, network IO, probably any performance metric you can think of. And since you're on a VPS, if you can't get SNMP running or exposed to you, then work with your provider. Hell, you could probably run MRTG on the machine itself if you have to

share|improve this answer
2  
+1, this is a good best practice to have around long before you need it. If you're setting up a new environment, I'd check out Munin, munin-monitoring.org. –  Kyle Smith Dec 19 '11 at 4:01
    
It's not clear to me how I would generate the data to monitor. Also, since I'm on a managed VPS solution, I don't have unrestricted access to the server resources. –  Tola Odejayi Dec 19 '11 at 5:18
1  
The snmpd process on the server is what exposes the performance data - CPU, memory, disk IO, network IO, probably any performance metric you can think of. And since you're on a VPS, if you can't get SNMP running or exposed to you, then work with your provider. Hell, you could probably run MRTG on the machine itself if you have to. –  mfinni Dec 19 '11 at 14:31
    
Ah - I see. I'm not really familiar with server administration; I'm being thrust into this situation because my hosting provider is saying that my site's current usage is too high, and I need to figure out why. I'll do more digging into how to collect information on snmpd. Other than the man page here (net-snmp.org/docs/man/snmpd.html), are there any other good resources for understanding this that you would recommend? –  Tola Odejayi Dec 19 '11 at 18:26
    
The documentation on tools like MRTG and Munin should help a lot. –  mfinni Dec 19 '11 at 19:41
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.