İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

httpd.conf için öneri

cagatayh

0
İyinet Üyesi
Katılım
22 Ekim 2007
Mesajlar
28
Reaction score
0
KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 15
MinSpareServers 16
MaxSpareServers 64
StartServers 16
MaxClients 512
MaxRequestsPerChild 1000
Timeout 300

Şu an yukarıdaki ayarlar mevcut.

Intel(R) Xeon(R) CPU 3040 @ 1.86GHz
512 Mb Ram

Vds üzerinde vbulletin + vbseo günlük 10-13k arası bir forum yer alıyor. Kısa süreler içerisinde konulara tıklayınca hızlı girerken birden bir yavaşlama oluyor load yükseliyor, 5-6 sn sonra açılıyor sayfa. Sonra tekrar hızlanıyor.

Nasıl bir ayar yapmalıyım httpd.conf için ?
Teşekkürler
 

Angelo

0
İyinet Üyesi
Katılım
13 Aralık 2004
Mesajlar
9,603
Reaction score
111
Konum
AZ
MaxKeepAlive 0
keepalive timeout 3
timeout 5

ve yavaşladığı anda

# ps aux | grep httpd | wc -l

yaparak kaç kişi bağlı kontrol et, Max Clients limitini aşıyor olabilirsin, bu durumda Apache boş slot bulana kadar browser havada kalır.
 

cagatayh

0
İyinet Üyesi
Katılım
22 Ekim 2007
Mesajlar
28
Reaction score
0
Timeout 300 idi 5 yaptım.
KeepAliveTimeout 15 idi 3 yaptım.
MaxKeepAlive 0 ? yazınca httpd'e reset atılamıyor. Böyle bir değişken varmıydı ki ?

Ayrıca şu an yavaştı mesala, kontrol ettim 12 değeri çıktı.
 

Angelo

0
İyinet Üyesi
Katılım
13 Aralık 2004
Mesajlar
9,603
Reaction score
111
Konum
AZ
MaxKeepAliveRequests idi direktif, ben kısaltıp yazmıştım. 12 hiçbirşey değil, dolayısıyla Apache'de herhangi bir problem yok, başka çalışan servisler varsa bunları kontrol edebilirsin. Aynı zamanda o anki server load'u kontrol etmende fayda var.
# uptime
veya
# w
ile.

VPS'lerde ayrıca kaynak sıkıntısı da çıkıyor olabilir ana makineden. Herşeyine sen hakim değilsin, paylaşımlı sonuçta.
 

cagatayh

0
İyinet Üyesi
Katılım
22 Ekim 2007
Mesajlar
28
Reaction score
0
Load 2.15 lere kadar çıkıyor bazen normalde 1.00 altı. Cpu ise ani değişimler oluyor %12 sonra %1 vb. gibi. Bunu cpu değişmesini ise komutlardan "/usr/sbin/httpd -k start -DSSL" veya "httpd" yapıyor.

My.cnf'de optimasyon sıkıntısı mı var acaba. Script'e göre ayarlamaları kendim yapmıştım hepsine yeşil renk ile uygun değerler demişti.

Teşekkürler ayrıca.

Edit: Olay şimdi de baktım da şu şekilde gelişiyor:
Normal forum sayfaları hızlı açılıyor. Bir konudan diğer konuya tıklıyorum giriyor hemen. Bu denemelerin bir yerinde tıklıyorum ancak sayfa açılması 7-8 sn sürüyor, bekliyor. Sonra yine hızlı hızlı sayfalar açılıyor yine bir yerde kitleniyor sanki.
 

Angelo

0
İyinet Üyesi
Katılım
13 Aralık 2004
Mesajlar
9,603
Reaction score
111
Konum
AZ
Load 2.15 sistemi yavaşlatacak bir load değil. Büyük ihtimalle VPS'in bulunduğu makine performans sorunları çekiyor. Ayrıca hardware değil, bağlantısal bir problem de olabilir.
 

cagatayh

0
İyinet Üyesi
Katılım
22 Ekim 2007
Mesajlar
28
Reaction score
0
48 saati geçti mysql optimasyon yazılımının süresi. Aşağıdaki gibi bir sonuç çıktı. Nasıl bir değişiklik yapmamı önerirsiniz ?

Şuan my.cnf içinde bulunan ayarlar:

Kod:
[mysqld]
local-infile=0
skip-locking
skip-innodb
skip-name-resolve
max_connections=50
max_user_connections=30
max_allowed_packet=32M
thread_cache_size=128
key_buffer=32M
join_buffer=3M
record_buffer=16M
sort_buffer_size=4M
read_buffer_size=4M
read_rnd_buffer_size=4M
thread_concurrency=8
thread_cache_size=128
myisam_sort_buffer_size=64M
query_cache_type=1
query_cache_size=15M
query_cache_limit=4M
table_cache=2000
low_priority_updates=1
log-slow-queries=/var/log/mysql-slow.log
long_query_time=1
wait_timeout=60
connect_timeout=5
concurrent_insert=2
log-queries-not-using-indexes
default-storage-engine = MyISAM

MYSQL PERFORMANCE TUNING PRIMER:

Kod:
       -- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.0.67-community-log i686

Uptime = 2 days 10 hrs 22 min 14 sec
Avg. qps = 6
Total Questions = 1366252
Threads Connected = 1

Server has been running for over 48hrs.
It should be safe to follow these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 1 sec.
You have 84067 out of 1366291 that take longer than 1 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 128
Current threads_cached = 31
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 50
Current threads_connected = 1
Historic max_used_connections = 32
The number of used connections is 64% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 540 M
Configured Max Per-thread Buffers : 756 M
Configured Max Global Buffers : 57 M
Configured Max Memory Limit : 813 M
Physical Memory : 512 M

Max memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 38 M
Current key_buffer_size = 32 M
Key cache miss rate is 1 : 9550
Key buffer free ratio = 65 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 15 M
Current query_cache_used = 5 M
Current query_cache_limit = 4 M
Current Query cache Memory fill ratio = 34.79 %
Current query_cache_min_res_unit = 4 K
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 4 M
Current read_rnd_buffer_size = 4 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 3.00 M
You have had 7 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 = 4060 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 182 tables
You have 319 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 33885 temp tables, 0% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 4 M
Current table scan ratio = 291 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 310
You may benefit from selective use of InnoDB.
 

iyinet

Root
Admin
Hosting Firması
Katılım
2 Eylül 2002
Mesajlar
5,028
Reaction score
65
Konum
Sakarya
512Mb bellek çok az.
MySQL çalıştıracaksanız, en az 2Gb sadece MySQL e gerekiyor.
4Gb ve üstü tavsiye edilir.

Elinizdeki konfigürasyon için:

key_buffer=64M
table_cache=500
query_cache_size=32M
#query_cache_limit=4M # kapatin
 

cagatayh

0
İyinet Üyesi
Katılım
22 Ekim 2007
Mesajlar
28
Reaction score
0
Teşekkürler iyinet :)
#query_cache_limit=4M

Yaptıktan sonra şu an tekrar yazılımı çalıştırdığımda limit 1 olarak gözükmekte. Problem teşkil etmez değil mi iyinet ?
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

Üst