PDA

View Full Version : Need help With Memcache + Server issues


Yellow Slider
Thu 28th Jun '07, 2:53pm
This is my last thread where I've asked for optimization
http://www.vbulletin.com/forum/showthread.php?t=233201

I Run debug mode on my forums, and a coder told me that the php process time is long..
The page generation time in my board is high. although you can see I have a strong server.
we had converted a few weeks ago to UTF8 and the DB wight had raised up to 900 MB (from 600) because of the change in the Collection..
I want to see my board runs smoothly with out any delays etc' (something like VB com :) )
what can I do to decrease my page generation time?

I don't want to lose all of my modifications and style (http://www.vbulletin.com/forum/showthread.php?t=234637) when i'm restarting the apache some of the Errors are disappearing maybe it has somthing to do with the apache Version? or php?

also, I'm not that updated, I've installed mamcache and edited the config file, but there isn't any decrease in the server load \ page generation time..

What do i need to install \ edit in a different way ( i saw some files that were uploaded by staff members here somthing about the config in a txt file..)
How can I make the best out of memcahce? cous for now I don't see any change and i really need it to work .. I've read lot about it and I would want to know what can i edit / add to get the best out of memcache.

Thanks lot, and please try to answer all of my questions :)

jason|xoxide
Fri 29th Jun '07, 11:33am
Memcache is not going to help you if you were already using the file datastore and a PHP cache.

I read through your other thread and one of the reasons why your site is slow is because of heavy swap usage. Have you resolved that yet (by adding more memory, moving to a new server, disabling features, etc.)?

Yellow Slider
Fri 29th Jun '07, 1:15pm
I don't see where is the problem with the swap usage I have just chackes it, i"ve another VB system (300 MB DB , 3.5.4) that runs much faster then my first board.. on the same server.

Swap: 2031608k total, 152k used, 2031456k free, 601768k cached
152k used cuse of a backup i made this morning and it is not cleaning until restart , by everything is fine , no swap is in use right now

I'm really hoping to find a solution..

jason|xoxide
Fri 29th Jun '07, 1:26pm
Your other thread said "801060K" (almost 800MB). Swapping that much IS a problem, even if only sporadically.

Have you implemented the recommendations made by eva2000? If so, and you still have a problem, please post all of the info requested by the sticky again, making sure that your server has been running for a couple days (without restarting any services) before you gather any info.

Yellow Slider
Fri 29th Jun '07, 2:36pm
Memcache is not going to help you if you were already using the file datastore and a PHP cache.

I read through your other thread and one of the reasons why your site is slow is because of heavy swap usage. Have you resolved that yet (by adding more memory, moving to a new server, disabling features, etc.)?

Your other thread said "801060K" (almost 800MB). Swapping that much IS a problem, even if only sporadically.

Have you implemented the recommendations made by eva2000? If so, and you still have a problem, please post all of the info requested by the sticky again, making sure that your server has been running for a couple days (without restarting any services) before you gather any info.

1)
It's dedicated, and has one more forum on it.

2)
Dual-Core AMD Opteron(tm) Processor 1210
Vendor IDAuthenticAMD
Processor Speed (MHz)1000.000
2 Gb ram
Processor NameDual-Core AMD Opteron(tm) Processor 1210
Apache 1.3.37
DirectAdmin 1.29.7
MySQL 4.1.21
Named 9.3.3rc3

3) 3.6.7
4) don't really know.
6) posts : 1,216,620 , threads : 109,921 , members : 51,296
7) [mysqld]
safe-show-database
old_passwords
back_log = 75
skip-innodb
max_connections = 500
key_buffer = 64M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1800
thread_cache_size = 384
wait_timeout = 35
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
max_connect_errors = 10


8) | read_rnd_buffer_size | 520192 |
| relay_log_purge | ON |
| relay_log_space_limit | 0 |
| rpl_recovery_rank | 0 |
| secure_auth | OFF |
| server_id | 0 |
| skip_external_locking | ON |
| skip_networking | OFF |
| skip_show_database | OFF |
| slave_net_timeout | 3600 |
| slave_transaction_retries | 0 |
| slow_launch_time | 2 |
| socket | /var/lib/mysql/mysql.sock |
| sort_buffer_size | 2097144 |
| sql_mode | |
| sql_notes | OFF |
| sql_warnings | OFF |
| storage_engine | MyISAM |
| sync_binlog | 0 |
| sync_frm | ON |
| sync_replication | 0 |
| sync_replication_slave_id | 0 |
| sync_replication_timeout | 0 |
| system_time_zone | IDT |
| table_cache | 1800 |
| table_type | MyISAM |
| thread_cache_size | 384 |
| thread_stack | 126976 |
| time_format | %H:%i:%s |
| time_zone | SYSTEM |
| tmp_table_size | 67108864 |
| tmpdir | |
| transaction_alloc_block_size | 8192 |
| transaction_prealloc_size | 4096 |
| tx_isolation | REPEATABLE-READ |
| version | 4.1.21-standard |
| version_comment | MySQL Community Edition - Standard (GPL) |
| version_compile_machine | i686 |
| version_compile_os | pc-linux-gnu |
| wait_timeout | 35 |
+---------------------------------+------------------------------------------+
+----------------------------+------------+
| Variable_name | Value |
+----------------------------+------------+
| Aborted_clients | 152 |
| Aborted_connects | 3 |
| Binlog_cache_disk_use | 0 |
| Binlog_cache_use | 0 |
| Bytes_received | 286527630 |
| Bytes_sent | 2731618915 |
| Com_admin_commands | 0 |
| Com_alter_db | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 67977 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_checksum | 0 |
| Com_commit | 0 |
| Com_create_db | 0 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 10 |
| Com_dealloc_sql | 0 |
| Com_delete | 7467 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 10 |
| Com_drop_user | 0 |
| Com_execute_sql | 0 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 30414 |
| Com_insert_select | 10 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 0 |
| Com_optimize | 0 |
| Com_preload_keys | 0 |
| Com_prepare_sql | 0 |
| Com_purge | 0 |
| Com_purge_before_date | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 3017 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_revoke_all | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 398384 |
| Com_set_option | 2 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_charsets | 0 |
| Com_show_collations | 0 |
| Com_show_column_types | 0 |
| Com_show_create_db | 0 |
| Com_show_create_table | 0 |
| Com_show_databases | 0 |
| Com_show_errors | 0 |
| Com_show_fields | 2 |
| Com_show_grants | 0 |
| Com_show_innodb_status | 0 |
| Com_show_keys | 2 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_ndb_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_privileges | 0 |
| Com_show_processlist | 0 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 1 |
| Com_show_storage_engines | 0 |
| Com_show_tables | 6 |
| Com_show_variables | 41 |
| Com_show_warnings | 0 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_stmt_close | 0 |
| Com_stmt_execute | 0 |
| Com_stmt_prepare | 0 |
| Com_stmt_reset | 0 |
| Com_stmt_send_long_data | 0 |
| Com_truncate | 10 |
| Com_unlock_tables | 0 |
| Com_update | 88923 |
| Com_update_multi | 10 |
| Connections | 67976 |
| Created_tmp_disk_tables | 632 |
| Created_tmp_files | 108 |
| Created_tmp_tables | 15181 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 9144 |
| Handler_discover | 0 |
| Handler_read_first | 48882 |
| Handler_read_key | 8549869 |
| Handler_read_next | 120146996 |
| Handler_read_prev | 665262 |
| Handler_read_rnd | 966641 |
| Handler_read_rnd_next | 435655087 |
| Handler_rollback | 0 |
| Handler_update | 116087 |
| Handler_write | 932831 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 0 |
| Key_blocks_used | 57990 |
| Key_read_requests | 35159425 |
| Key_reads | 78436 |
| Key_write_requests | 211292 |
| Key_writes | 114725 |
| Max_used_connections | 41 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 803 |
| Open_streams | 0 |
| Open_tables | 550 |
| Opened_tables | 600 |
| Qcache_free_blocks | 1740 |
| Qcache_free_memory | 37835576 |
| Qcache_hits | 334080 |
| Qcache_inserts | 396803 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 1581 |
| Qcache_queries_in_cache | 6622 |
| Qcache_total_blocks | 15663 |
| Questions | 998261 |
| Rpl_status | NULL |
| Select_full_join | 366 |
| Select_full_range_join | 0 |
| Select_range | 68959 |
| Select_range_check | 0 |
| Select_scan | 50183 |
| Slave_open_temp_tables | 0 |
| Slave_retried_transactions | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 35 |
| Sort_merge_passes | 74 |
| Sort_range | 64132 |
| Sort_rows | 3416876 |
| Sort_scan | 14476 |
| Table_locks_immediate | 1138643 |
| Table_locks_waited | 3469 |
| Threads_cached | 40 |
| Threads_connected | 1 |
| Threads_created | 41 |
| Threads_running | 1 |
| Uptime | 17021 |
+----------------------------+------------+
Uptime: 17021 Threads: 1 Questions: 998262 Slow queries: 35 Opens: 600 Flush tables: 1 Open tables: 550 Queries per second avg: 58.649
mysqladmin Ver 8.41 Distrib 4.1.21, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 4.1.21-standard
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 4 hours 43 min 41 sec

Threads: 1 Questions: 998262 Slow queries: 35 Opens: 600 Flush tables: 1 Open tables: 550 Queries per second avg: 58.649


9) There is another board on the server (300Mb DB - vb 3.5.4 runs really good and fast..)

10) there are 500-600 users online in 3600 seconds

11) http://subs.atraf-f.net/atraf.php

12)Timeout 30
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 4
MinSpareServers 15
MaxSpareServers 20
StartServers 10
MaxClients 280
MaxRequestsPerChild 400

13) the logs aren't more then 100mb
14)[root@server etc]# uname -a
Linux server.ben399.com 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:37:32 EDT 2006 i686 athlon i386 GNU/Linux



core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
max nice (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 31743
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
max rt priority (-r) 0
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 31743
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[root@server etc]#


[root@server etc]# cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 67
model name : Dual-Core AMD Opteron(tm) Processor 1210
stepping : 2
cpu MHz : 1800.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8legacy ts fid vid ttp tm stc
bogomips : 3620.26

processor : 1
vendor_id : AuthenticAMD
cpu family : 15
model : 67
model name : Dual-Core AMD Opteron(tm) Processor 1210
stepping : 2
cpu MHz : 1800.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8legacy ts fid vid ttp tm stc
bogomips : 3620.26

jason|xoxide
Fri 29th Jun '07, 2:47pm
Looking over the data you just posted, you don't seem to have implemented any of the suggestions that eva2000 posted in your other thread, nor did you follow my advice and wait to post updated info until the server had been running for a couple days without any services being restarted.

Yellow Slider
Fri 29th Jun '07, 4:04pm
I had installed APC, I have disabled the 4 options of the online users, I have changed my.cnf .
i tried to reconfigure apache , but after i made those changes , the load of the server went high .. and it didnlt help the speed.
so i decided to go back to the old settings ..

Hebrew databases have problems with 4.1.22 , it's giving us an headache ..
and early this evening we had a problem so we restarted the server. this is it.. do you see something that we need to change?
I will try anything you'll give to try..

Just upgraded PHP and apache
Server Version: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.8b DAV/2 PHP/5.2.3