I was running my VPS with CentOS on 1G memory, but I saw the memory was getting "full" so I had 1G extra installed.
This VPS is one I rent at a hosting company. That company did most of the configuration for me on installation of the VPS. They also installed DirectAdmin and handled all domain/DNS issues.
I only installed certain user/FTP accounts and uploaded all my production websites. This servers hosts: 5 small static PHP websites, 2 wordpress websites, 1 Magento webshop, a testing evirment for myself and all e-mail accounts for each website.
My goal is to enhance the server performance.
I looked at various of guides on the internet. I broke allot of things and had to fix them afterwards, so I learned as I was going. I found out that I need to follow some correct guides/tutorials and need to make sure to follow only CentOs related stuff.
ulimit -a and
free -m command tell the following:
[root@1332 etc]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 32365 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 32365 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited [root@1332 etc]# free -m total used free shared buffers cached Mem: 2026 990 1036 0 129 620 -/+ buffers/cache: 240 1786 Swap: 2047 0 2047
So I have some extra free memory
top - 14:35:36 up 4:15, 1 user, load average: 0.57, 0.49, 0.46 Tasks: 169 total, 1 running, 168 sleeping, 0 stopped, 0 zombie Cpu(s): 0.1%us, 0.0%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.1%hi, 0.0%si, 0.0%st Mem: 2075000k total, 1016716k used, 1058284k free, 133924k buffers Swap: 2097144k total, 0k used, 2097144k free, 637168k cached
I did a restart of the server, thats probably why everything is looking great.
my.cnf settings to the following:
[mysqld] local-infile=0 skip-locking query_cache_limit=2M query_cache_size=64M query_cache_type=1 max_connections=500 interactive_timeout=100 wait_timeout=120 connect_timeout=10 thread_cache_size=128 key_buffer=384M join_buffer=8M max_allowed_packet=16M table_cache=1024 record_buffer=1M sort_buffer_size=2M read_buffer_size=2M max_connect_errors=10 # Try number of CPU's*2 for thread_concurrency thread_concurrency=6 myisam_sort_buffer_size=64M server-id=1 [safe_mysqld] err-log=/var/log/mysqld.log open_files_limit=8192 [mysqldump] quick max_allowed_packet=16M [mysql] no-auto-rehash #safe-updates [isamchk] key_buffer=64M sort_buffer=64M read_buffer=16M write_buffer=16M [myisamchk] key_buffer=64M sort_buffer=64M read_buffer=16M write_buffer=16M [mysqlhotcopy] interactive-timeout
I noticed that I don't have any
innoDB settings here.
Probably because they aren't installed or because of the presence of DirectAdmin or because my hoster doesn't use that.
So, some questions:
Are my.cnf settings "correct" for having the best settings? (at this moment)
Are there any other settings I need to worry about?
Are there any performance tweaks I still need to do for Magento? (I tried installing APC or Xcache, but that didn't do much)
I installed REDIS, but is it normal that I don't "feel" anything in performance because of that?