we've currently got a 2 server setup, apache+mysql
Mysql server is a Xeon 3.2Ghz with 2Gb ram, scsi 73gb raid1 disks
Server has been running a while, steadily increasing in traffic. whilst 90% of the time it's running ok (load around 0.5 - 1.0, cpu around 25-50% busy mainly mysql, disk i/o around 3% busy) during heavy traffic times everything slows right down
At the moment the mysql box is only running mysql so we've allocated about 1.5gb out of the 2gb to mysql.
At present, when we get busy the apache server is queing up requests as it waits for the mysql server. Query log shows most queries are <1sec, any other's are being optimised but due to the nature of our website there are a few pesky queries (only occasionally being slow though).
question is, can this config be tuned any more or is it time for an upgrade - mainly ram to add more innodb buffers?
Here's the result of tuning-primer.sh
Code: SLOW QUERIES The slow query log is enabled. Current long_query_time = 2 sec. You have 9 out of 159346 that take longer than 2 sec. to complete Your long_query_time seems to be fine
BINARY UPDATE LOG The binary update log is enabled The expire_logs_days is not set. The mysqld will retain the entire binary log until RESET MASTER or PURGE MASTER LOGS commands are run manually Setting expire_log_days will allow you to remove old binary logs automatically See http://dev.mysql.com/doc/refman/4.1/en/purge-master-logs.html
WORKER THREADS Current thread_cache_size = 384 Current threads_cached = 15 Current threads_per_sec = 0 Historic threads_per_sec = 0 Your thread_cache_size is fine
MAX CONNECTIONS Current max_connections = 150 Current threads_connected = 4 Historic max_used_connections = 18 The number of used connections is 12% of the configured maximum. Your max_connections variable seems to be fine.
MEMORY USAGE Max Memory Ever Allocated : 1 G Configured Max Per-thread Buffers : 5 G Configured Max Global Buffers : 803 M Configured Max Memory Limit : 6 G Physical Memory : 1.99 G
Max memory limit exceeds 90% of physical memory
KEY BUFFER Current MyISAM index space = 82 K Current key_buffer_size = 5 M Key cache miss rate is 1 : 1862 Key buffer fill ratio = 100.00 % Your key_buffer_size seems to be fine
QUERY CACHE Query cache is supported but not enabled Perhaps you should set the query_cache_size
SORT OPERATIONS Current sort_buffer_size = 16 M Current read_rnd_buffer_size = 7 M Sort buffer seems to be fine
JOINS Current join_buffer_size = 4.00 M You have had 0 queries where a join could not use an index properly Your joins seem to be using indexes properly join_buffer_size >= 4 M This is not advised
OPEN FILES LIMIT Current open_files_limit = 11095 files The open_files_limit should typically be set to at least 2x-3x that of table_cache if you have heavy MyISAM usage. Your open_files_limit value seems to be fine
TABLE CACHE Current table_cache value = 5467 tables You have a total of 732 tables You have 155 open tables. The table_cache value seems to be fine
TEMP TABLES Current max_heap_table_size = 255 M Current tmp_table_size = 256 M Of 21109 temp tables, 35% were created on disk Effective in-memory tmp_table_size is limited to max_heap_table_size. Perhaps you should increase your tmp_table_size and/or max_heap_table_size to reduce the number of disk-based temporary tables Note! BLOB and TEXT columns are not allow in memory tables. If you are using these columns raising these values might not impact your ratio of on disk temp tables.
TABLE SCANS Current read_buffer_size = 7 M Current table scan ratio = 929 : 1 read_buffer_size seems to be fine
TABLE LOCKING Current Lock Wait ratio = 1 : 117 You may benefit from selective use of InnoDB. If you have long running SELECT's against MyISAM tables and perform frequent updates consider setting 'low_priority_updates=1' Server is mainly Innodb due to previous row-locking issues.
I recently got my first dedicated server and now have it all up and running. I would like to optimize mySQL for improved performance.
Server running: CentOS 5, Tomcat, mySQL 5
Most queries: Single line queries (SELECT * FROM table WHERE name='John') NOTE: Most of my queries include the return of at least one blob (size range 100kb to 1Mb)
Server Specs: Dual Core Intel Pentium 3Ghz, 4GB RAM, 500Gb hard disk
Below is my current my.cnf file:
Code: [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 max_allowed_packet=16M skip-innodb skip-bdb
I'm running a message board and it looks like I've outgrown the low end xeon 3040 1.86GHz dual core server, and the bulk of the CPU load is going to mysqld. I'm debating between offloading the DB to a dedicated server vs upgrading the existing server and hosting the web server and db on the same machine.
Any thoughts on the better approach? fwiw, the load from apache seems next to nothing right now, but I am also planning on adding an SMTP server for user registrations and general support email.
I'm also not super familiar with dual-core and dual processor machines. Does shifting mysql to a dual core or dual proc machine help (vs a single core/single proc machine)? since there is just one mysql daemon, does having a second core or proc. buy me anything?
I am new to VPS and am trying to get my head around it. What I am trying to figure out now are the pros and cons of Guaranteed and Burstable memory.
Assuming everything else is equal, and both options are in the budget, and that there is a requirement (at least at times) for more than 768mb of RAM, which option is better:
1152mb Guaranteed (SLM)
or
768mb Guaranteed / Burstable to 2048mb
Obviously, a big factor would be whether or not their is RAM available to burst to, and as I understand it, that is completely dependant on the server, other VPS's running, number of VPS's, etc.
However, what I am trying to figure out is which approach is typically better. If for the same money you can get 768mb w/2048mb burst or 1152mb SLM w/no burst which is the best option.
If my current requirements are important, then I listed them in a thread titled: "If I go with VPS would vB performance suffer greatly if I add multiple sites to VPS?"
I can't truely link to it, because I have less than five posts, but here is a quote of that thread, so you can hit the button in the quote to go there:
Quote:
Originally Posted by tnedator
I am leaning towards one of these three VPS accounts that all cost roughly the same:
Today i need to run "OPTIMIZE TABLE" from MySQLTuner recommendation.
Now i don't know how to run it ? I try to put in SQL Query via phpmyadmin and:
SQL query:
OPTIMIZE TABLE
MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
I have purchased "Due2Core" with 4GB Ram. i have one problem. i hope someone help me in this matter.
I have hosted only 4 or 5 websites on dedicated. mostly maximum 8000 users visit my website. Maximum B/W usage is 35GB.
Daily 25 or 30 mints my websites "WebPages open speed slow". Some time problem occur for 1 time or 2 times. when i checked my server status report Load only 0.50% and Memory usage 35% only.
when i checked server and my sql usage report maximum http load come from my top visit websites.
some friend suggest me for optimize your dedicated apache. because some thing wrong in your apache.
because i have enough memory.
Anybody suggest me suitable apache Optimization method. with step by step.
Remember, in this time my server run default sitting.
I've been a long time follower of wht.com from reading the hosting reviews to optimizations, and now it's come to that point that I need to post a question to get more accurate help than reading others configurations since all servers and sites have their needs. So here it goes.
As I wrote in the topic my main concern is my apache config. I've tried many many different configs but I'm never sure when to stop optimizing it. The site is a chat community (myspace like site) with over 1000-2000 simultaneous users online that do everything from posting images, to talk in the forums. And yes I host everything on the same server atm.
My worry is that at night when the site has the most visitors the amount of processes that get produced get 'cut' as it seems to reach a limit somewhere. Below is an image of cacti with load and processes. Please ignore the load peaks as they are nothing then my average 'testing' periods of new functions
[url]
This seems to be run by my Max/MinSpareServers which I've played around with but as I said never could find a perfect spot. The amount of processes have always been controled by these values, before I increased them a couple of days ago the amount was around 600 processes to the max. Now as you can see on the latest graph it's around 800.
I've tried the default values but the site went to slow with those values. I've lately come up to what I think is insane values but it keeps the server ticking in a nice pace.
So I'm asking you guys for help as I've reached my trial and error sessions. I have no clue what 'ok' values are for amount of current processes running, and I don't' feel confident to increase the values.
here is my apache config.
Timeout 60 KeepAlive On MaxKeepAliveRequests 3500 KeepAliveTimeout 2
I have noticed that if I enable KeepAlive, the performance is much more better. However, Apache will be frozen few times a day without any reason. So, I need to turn off KeepAlive. Is there any idea why and how to fix? This is the configuration
There are some great tools to optimize MySQL, however I have not been able to find the equivalent for Apache + PHP. I have a lot of experience tweaking these two in extreme traffic environments, but there is no beating a program that can simultaneously evaluate several inputs over time to calculate optimal settings.
So I've recently ordered a Supermicro 4U server with 24x1TB HDs, 64GB RAM and put it in RAID 10. I'm running Debian 5.0 and have installed lighttpd. All the content I serve are video files (AVi, MP4, MKV, OGM) and each file is about 100-500mb in size. I'm wondering how can I optimize lighttpd to get the best performance out of it. I look forward to your replies.
how to optimize a server for playing flash videos?
Here is our website: operationsports.com
In the right menu you'll notice an embedded flash video player.
Often, we receive complaints that our videos are buffering slowly at the beginning causing the movie to stop/pause for a few seconds. After this pause the remainder of the video buffers lightening quick.
I'd like to remove the pause if possible.
The server is a dual processor linux based server dedicated entirely to our video files.
It has plenty of power.
how to optimize a server for playing flash videos smoothly?
Code: running a ipb forum site 2.3.4 current stats : Our members have made a total of 245,827 posts We have 14,673 registered members Total number of topics is 75099 with atleast 150 members online + 200guests.
what would be the perfect my.cnf config for this kinda of a server? Im running litespeed.
I have tried to manually setup awstats on a website in Windows 2008 with IIS 7. The problem here is that I have to create two conf files for each website, one named awstats.sitename.conf and the other awstats.www.sitename.conf. If I don't do so, then awstats does not work on either www.sitename.com or sitename.com. I cannot update the stats or view it from the browser. I have a few Hosting controller servers in which awstats is used and I compared the conf file with them and there is no difference. I wonder what could be the issue.