I'm trying to optimize a server (Intel E8300) with 8Gb of RAM and WHM/cPanel administration panel.
Now the server has only 46 accounts in WHM, and about 10.000 unique visitors / day
As mysql is always on top for CPU ussage I have edited 2 values in my.cnf, but this was done in 10 minutes and not to much research, any more help will be appreciated. On this server as I see it's been using MyISAM for storage engine and maybe just a few tabels with InnoDB ....
just got a new server and got my site up and running on it perfectly but ive noticed its a bit slower than my old server and i think this is down to my incorrctly optimized mysql setup. ive used the my.cnf off my old server with some minor edits but im wondering what people can suggest i change for the following server spec
AMD Athlon 64 X2 4200+ 2GB DDR2 120gb Sata hd
currently my my.cnf is as follows
Quote:
# This is for a system with little memory (32M - 64M) where MySQL plays # an important part, or systems up to 128M where MySQL is used together with # other programs (such as a web server) # # You can copy this file to # /etc/my.cnf to set global options, # mysql-data-dir/my.cnf to set server-specific options (in this # installation this directory is /var/lib/mysql) or # ~/.my.cnf to set user-specific options. # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program # with the "--help" option.
# The following options will be passed to all MySQL clients [client] #password = your_password port = 3306 socket = /var/lib/mysql/mysql.sock
according to mysql tuning primer it reports the following
Quote:
-- MYSQL PERFORMANCE TUNING PRIMER -- - By: Matthew Montgomery -
MySQL Version 4.1.20-log x86_64
Uptime = 0 days 17 hrs 52 min 44 sec Avg. qps = 15 Total Questions = 1028682 Threads Connected = 1
Warning: Server has not been running for at least 48hrs. It may not be safe to use these recommendations
To find out more information on how each of these runtime variables effects performance visit: [url] Visit [url] for info about MySQL's Enterprise Monitoring and Advisory Service
SLOW QUERIES Current long_query_time = 5 sec. You have 0 out of 1028694 that take longer than 5 sec. to complete The slow query log is NOT enabled. Your long_query_time seems to be fine
WORKER THREADS Current thread_cache_size = 256 Current threads_cached = 3 Current threads_per_sec = 0 Historic threads_per_sec = 0 Your thread_cache_size is fine
MAX CONNECTIONS Current max_connections = 1000 Current threads_connected = 1 Historic max_used_connections = 4 The number of used connections is 0% of the configured maximum. You are using less than 10% of your configured max_connections. Lowering max_connections could help to avoid an over-allocation of memory See "MEMORY USAGE" section to make sure you are not over-allocating
MEMORY USAGE Max Memory Ever Allocated : 243 M Configured Max Per-thread Buffers : 41 G Configured Max Global Buffers : 75 M Configured Max Memory Limit : 41 G Physical Memory : 1.90 G
Max memory limit exceeds 90% of physical memory
KEY BUFFER Current MyISAM index space = 12 M Current key_buffer_size = 1 M Key cache miss rate is 1 : 14581 Key buffer fill ratio = 44.00 % Your key_buffer_size seems to be too high. Perhaps you can use these resources elsewhere
QUERY CACHE Query cache is enabled Current query_cache_size = 64 M Current query_cache_used = 5 M Current query_cache_limit = 64 M Current Query cache Memory fill ratio = 8.42 % Current query_cache_min_res_unit = 4 K Query Cache is 15 % fragmented Run "FLUSH QUERY CACHE" periodically to defragment the query cache memory If you have many small queries lower 'query_cache_min_res_unit' to reduce fragmentation. Your query_cache_size seems to be too high. Perhaps you can use these resources elsewhere MySQL won't cache query results that are larger than query_cache_limit in size
SORT OPERATIONS Current sort_buffer_size = 32 M Current record/read_rnd_buffer_size = 1020 K Sort buffer seems to be fine
JOINS Current join_buffer_size = 3.00 M You have had 378 queries where a join could not use an index properly You should enable "log-queries-not-using-indexes" Then look for non indexed joins in the slow query log. If you are unable to optimize your queries you may want to increase your join_buffer_size to accommodate larger joins in one pass.
Note! This script will still suggest raising the join_buffer_size when ANY joins not using indexes are found.
OPEN FILES LIMIT Current open_files_limit = 50000 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 = 2000 tables You have a total of 908 tables You have 102 open tables. The table_cache value seems to be fine
TEMP TABLES Current max_heap_table_size = 31 M Current tmp_table_size = 30 M Of 3666 temp tables, 0% were created on disk Created disk tmp tables ratio seems fine
TABLE SCANS Current read_buffer_size = 5 M Current table scan ratio = 1544 : 1 read_buffer_size seems to be fine
TABLE LOCKING Current Lock Wait ratio = 1 : 4664 You may benefit from selective use of InnoDB.
The servers load is vey bad, most of the time 7-8+ and the IO WAIT more than 60% which is decreasing server performace. Please help me to optimzie the MySQL specially. If you have the good my.cnf config please give me the complete config file.
[client] port = 3306 socket = /var/lib/mysql/mysql.sock
someone to look at my DB and optimize it as it is running ridiculously high loads of 25. It is vbulletin. I'm only looking for professional companies for this job.
I have a friend which owns a 2k alexa rank forum using VB
The server hangs and he gets mysql connection error in logs
Quote:
Database error in vBulletin : mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
The server is a dual Pentium D with 4GB RAM
currently 600 users online and 20% RAM used
in rush hours there are 2000 users online and 50% RAM used
We want to optimize mysql - this is the current my.cnf
I just switched to a new server - I went from a Dual Opteron 248 with 3GB of RAM to a Dual Clovertown with 4GB of RAM. Yet, despite having mild traffic right now, my load is rather high and my memory usage is like 80% (which is ridiculous, since that would mean I would be maxing out on the old box).
For some reason, my servers usually lose access when I get around 400 people on TEXT-BASED, non-MySQL pages? How is that possible? I have really solid servers, yet people running basic Pentiums with 1 or 2GB never run into this issue.
Is there any good, cheap site that would be able to properly optimize mySQL and Apache to lower the load and figure out why the memory usage is so high? Platinum Server Management never really got this done, so even though they're great for other support issues, please don't recommend them.
i run a fedora server with plesk 8 on it i was wondering if some one can help me to find the best way to optimize the databases on the server at once my servers contains many clients with unicode data in the database.
On one of my servers (Intel P4 2.8Ghz, 1GB RAM, cPanel), I've been tweaking some of the MySQL values in my.cnf and using the MySQL Tuning Primer shell script to evaluate the results.
This is my current my.cnf. I'm running MySQL 5.0.27.
The tuning primer script is telling me the following.
PHP Code:
Current max_heap_table_size = 16 MCurrent tmp_table_size = 32 MOf 3875 temp tables, 52% were created on diskEffective 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_sizeto reduce the number of disk-based temporary tables
What values should I increase (if at all) max_heap_table_size and tmp_table_size to?
this is what SHOW STATUS; commands give me can anyone provide me any helpful tips on what I can adjust in my.cnf to lower my server load which is above 10 during peak hours and mysql is the only thing eating this serve up I have lots og 3gb ram and a 64bit AMD 2800 server
So the site got featured on [url]and now the server is drowning...
The Coppermine Gallery usually hovers around 30~50 users daily and now, 1800, and im at a lost as how I should configure mysql to take on such a load. right now it takes about 10 secs or more to load a page and sometimes it would time out. Because it si coppermine, all pages are dynamic and can't be cached -_-"
Here's the my.cnf right now after i played around with the numbers
server spec Opteron 170 (2ghz) 2gb ram 250 7200rpm
# # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive Off
# # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100
# # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15
# prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # ServerLimit: maximum value for MaxClients for the lifetime of the server # MaxClients: maximum number of server processes allowed to start # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 200 MaxClients 200 MaxRequestsPerChild 1500 </IfModule>
# worker MPM # StartServers: initial number of server processes to start # MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule worker.c> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule>
I have a fairly high end server in which I have installed SIM. SIM is restarting Apache up to 10 times a day, presumably due to high load causing un-availability.
On restart, Apache / MYSQL is stable until the load / mem usage begins to climb then it is restarted again. Here are my 'load' stats for today:
Load for today High (2:18am): 4.63 Low (3:30am): 1.20 Mean: 1.84 Latest: 1.61
Mem usage for today High (1:36am): 9,192.9 MB Low (1:48am): 7,995.7 MB Mean: 8,683.1 MB Latest: 8,781.7 MB
I have seen it using 20GB RAM before.
I have tried to follow various optimisation guides but these seem tailored to less powerful servers.
The web application I run on this server is almost entirely MYSQL based, with thousands of DB calls a day. Across the entire system I probably get 200,000 bot hits per day or even more. At peak times search engine bots are literally hammering the server.
Can anyone recommend a Apached and MYSQL optimization expert? I just some optimization done on mysql and apache upgraded... but pache wouldn't restart with the following entries:
if i remove above then it starts... but my CPU spikes and I am getting a ton of errors emailed to me:
Invalid SQL: SELECT COUNT(DISTINCT(userid)) AS count FROM vb_session WHERE vb_session.userid>0 AND vb_session.lastactivity>1245294346;
MySQL Error : Out of memory (Needed 8388580 bytes) Error Number : 5 Request Date : Wednesday, June 17th 2009 @ 09:39:06 PM Error Date : Wednesday, June 17th 2009 @ 09:39:06 PM
Its constantly complaining about this same query and i thought i removed all of the vbulletin options...
i am pulling my hair out... cuz my server isn't swapping, ther are 0ver 8GBs in cache.... but my CPU goes up
Here is original problem thread...
[url]
2nd post has recommended config... and my subsequent probs
Haven't seen much debate lately on what processors to use within dedicated database servers. We're currently considering Dell 2950s and 2970s with the following:
8GB RAM, single SAS, 3.5-inch, 15K RPM Hard Drive for OS, single SAS, 3.5-inch, 15K RPM Hard Drive for SWAP, and four SAS, 3.5-inch, 15K RPM Hard Drives in a RAID10 array for database storage.
We'll be getting one server just for MySQL applications and one server for just PostgreSQL applications.
anyone have any tips on how to optimize WHM / cpanel to run at top performance on 256-512mb guaranteed VPS accounts?
I've had several VPS providers in the past, and each one of them run webpages and LAMP stuff fine, but as soon as I bring up cpanel /whm, it either crashes the VPS altogether, or cpanel and whm run very slow, choppy, pretty much bogging the whole VPS down, doesn't seem to matter if the VPS is running on 256 or 512, still same issues. I run on Virtuozzo, which I don't know if thats part of the problem, or not,
really all I use out of cpanel/ WHM is the standard things like
creating/deleting accounts RVSkin, Fantastico
basically what a reseller would use. the rest of the stuff I do not use, so I was just wondering if there was a tutorial on how to strip down WHM / cpanel somehow so it would run better on VPS accounts? or if someone could write one up perhaps?
We are hosting our software system which do calculation and file manipulation. Now we have Intel Core 2 Duo E6750 and would like to get Intel Core 2 Quad Q6600 to increase our system performance.
Also we have other choice, get Intel Xeon E5405 Harpertown 2.0GHz to replace two above.
I think it is better to have one server box because one box easy to manage than two. Also Harpertown is much faster than these two together.
I have currently a server with a "Intel Core 2 duo e6640 2.4Ghz".
Now the company I'm at moving to a new data center and offering me a box for the same price with a Intel P3.4.
As I understand I would move from a two core to a single core CPU. In the first move letter they send me, they where saying I would get a CPU plus, plus 1 GB mem more.
I'm running a Xeon Quad Core 2.5GHz with 2GB RAM. Comments on my setup for shared hosting? (will upgrade ram if people believe that will help with increase page loadtimes.)
Warning: mysql_connect() [function.mysql-connect]: Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug in /home/user/public_html/file.php on line 400 Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
currently im on a VPS server and things are fine normally. However whenever there are like 20 users on my site (browser based text game) things get ugly. The sql queries are all needed and don't think it can get much more effiecent.
Anyways my website is very dynamic all information is changing every second.
For example a user when every page they go to or refresh their account is being set to time() to show that they are online at that second. Processor load gets up to like 6 at times and that is when it is virtually impossible to connect to the site.
Is there anythign you recommend? mysql is the top then when i login via ssh and run 'top'
I have a large proxy, are getting ~3k pageviews/day.
I only got 128 MB RAM on my VPS, so no panels works on it (not even kloxo/lxa). I would guess apache wont do it in the long run either.
So I decided to go with nginx. But I feel it isn't quite good optimized, as it sometimes takes like 1 minute to load the page.
Here is my current config:
####################################################################### # # This is the main Nginx configuration file. # # More information about the configuration options is available on # * the English wiki - http://wiki.codemongers.com/Main # * the Russian documentation - http://sysoev.ru/nginx/ # #######################################################################
#---------------------------------------------------------------------- # Main Module - directives that cover basic functionality # # http://wiki.codemongers.com/NginxMainModule # #----------------------------------------------------------------------
I am facing problem regarding my site. I have dedicated server with WHM/cPanel, i have integrated tomcat with apache , the apache processes are too high aroung 1200-1400, So please guide me howto optimize my apache for better performance.
root@trick [/]# ps aux | grep -c httpd 1403 root@trick [/]# ps aux | grep -c mysql 3 root@trick [/l]# free -m total used free shared buffers cached Mem: 4053 3408 645 0 220 1890 -/+ buffers/cache: 1297 2756 Swap: 4094 0 4094
---------------------------------------------
KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15
I'm looking to get some tips to optimize my Apache webservers. Now i have 2 apache servers with load balancer. If someone can guide me and bring some tips for this purpose is highly appreciated.
Also, i would like to know about disadvantages of enabling KeepAlive. Recently i have enabled it and found my site load much better. But the disadvantage (that i experienced personally) is after stop browsing for a while (about 40-60 minutes) i need to keep triggering the URL of site several times to get enter the website. If not i can't get into it and it likes the site giving no response at all.
right ive got a server thats getting battered at the moment by lots of apache processes, ive moved sql off to a seperate box (with private lan so thats fine) but now i need to optimize/replace apache with something less intensive on resources, only problem is im using plesk on this server so i am not sure if i can change the webserver app?
I am switching from shared hosting to managed VPS. I have minimal knowledge of UNIX/Apache, pretty good with PHP and programming in general.
So, what I have now is my VPS, with 512mb of ram, CentOS, cpanel and my two sites, not live yet, that is, I haven't changed dns records in the registrar.
I want to try to optimize the box or whatever is the correct name for it and understand the whole thing better. Mainly to learn more, I dot' think I'll be pressed for memory or bandwidth for now. Still, at least knowing things I can optimize for speed of space.
Few things that I assume should allow for some simplification and RAM savings(hopefully) is that:
a) Both sites are hobby sites, not very big load. Few thousand visitors a day. Traffic is around 10gb monthly combined.
b) Both sites are mine, nobody else on that box, so I don't have to worry about customers screwing things up and caging things internally.
Based on that, I don't really need email for the second site domain.
When I run top command I see 2 exim processes running. Is that normal, or is it because I have 2 domains registered there? And if yes can one be disabled?
Same applies to pop3-login and imap-login processes, 2 copies of each. Can I have just one of each, i.e. exim, pop3-login and imap-login?
Next, I selected not to run log analyzer cpanellogd for 21 hours, i.e. it'll run for 3 hours a day. I assume that should be sufficient for the site like mine?
I did read sticky about securing the site and quite a bit about Apache/mysql optimizations.