النتائج 1 إلى 12 من 12

الموضوع: سكربت يساعدك في إعدادات ملف my.cnf لـ MySQL

  1. #1
    عضو نشيط جدا
    تاريخ التسجيل
    Nov 2003
    المشاركات
    367

    سكربت يساعدك في إعدادات ملف my.cnf لـ MySQL



    السلام عليكم..

    كتير منا بعاني من إعدادات الـ MySQL .. وشو أفضل إعدادات لسيرفره .. بما يتناسب مع الرام والضغط على السيرفر...

    وأنا واحد من هالناس اللي طلعت روحي وأنا ببحث عن أفضل إعدادات للأباتشي..
    والحمد لله بعد عناء .. وجدت هذا السكربت .. وأفادني كتير في إعدادات ملف my.cnf

    والحمد لله السيرفر أصبح الآن وضعه مستقر ، وحبيت أضع هالسكربت في سوالف حتى يستفيد منه باقي الأعضاء..


    إسم السكربت Tuning-Primer.sh

    طريقة التركيب

    عن طريق الشل
    كود:
    cd /usr/bin
    وبعدها نقوم بسحب السكربت من الموقع
    كود:
    wget http://www.day32.com/MySQL/tuning-primer.sh
    نغير صلاحيات الملف
    كود:
    chmod 755 tuning-primer.sh
    ومن ثم نشغل السكربت .. وننتظر حتى ينتهي من الفحص وإعطاءك النتائج
    كود:
    tuning-primer.sh
    سوف يقوم بإخراج نتائج لكل عملية فحص للإعدادات في ملف my.cnf

    ويخبرك بماذا يحتاج سيرفرك من تعديلات في الإعدادات ويكون المطلوب تعديله باللون الأحمر ..
    وإذا كانت الإعدادات سليمة سيخبرك بأنها سليمة باللون الأخضر..

    وإتبع ماذا يقترح عليك السكربت، حتى تصل إلى أفضل إعدادات..

    الكثير سيلاحظ مشاكل في MEMORY USAGE وحسبتها كالتالي
    كود:
    (key_buffer + sort_buffer + read_buffer) x max_connections = RAM
    ملاحظة: لأفضل نتائج يجب أن يمر على تشغيل الـ MySQL أكثر من 48 ساعة.



    تقبلوا تحياتي





    __________________
    لسنا أول من عبر المحيط


  2. #2
    عضو نشيط
    تاريخ التسجيل
    Jun 2005
    المشاركات
    189


    ما جربته لكن الله يعطيك الف عافيه لسعييك على نشر الفائده والله يوفقك





    __________________
    -:: عالم من البرمجه والابداع ::-

  3. #3
    عضو فعال
    تاريخ التسجيل
    Jul 2001
    المشاركات
    1,852


    يعطيك العافية


    البرنامج تم تجربتة سابقا و ممتاز جدا





    __________________
    مرحبا بكم في مدونتي
    http://www.abdullah.cc

    معا لنشر المعلومه في سوالف

  4. #4
    عضو نشيط جدا
    تاريخ التسجيل
    Nov 2003
    المشاركات
    367


    اقتباس المشاركة الأصلية كتبت بواسطة Sn3s
    يعطيك العافية


    البرنامج تم تجربتة سابقا و ممتاز جدا
    السكربت ممتاز جداً .. ولأنه أفداني كثيراً وضعته في سوالف..
    وأشكرك على ردك الإيجابي الذي سيشجع الكثيرين على إستخدام السكربت وذلك لأنك محل ثقة وذو خبرة كبيرة



    majed2002
    الله يعافيك ..





    __________________
    لسنا أول من عبر المحيط

  5. #5
    عضو نشيط
    تاريخ التسجيل
    Nov 2005
    المشاركات
    280


    هلا اخوي BIOs

    دائماً تتحفنا بأفضل المواضيع .. الله يعطيك ألف عافيه






  6. #6
    عضو فعال
    تاريخ التسجيل
    Sep 2006
    المشاركات
    1,619


    ياخي روح الله يوفقك ويجزاك الف خير !!





    __________________
    لا إله الا الله .. سبحانك إني كنت من الظالمين
    سبحانك الله و بحمدك .. سبحان الله العظيم ...!!

  7. #7
    عضو نشيط جدا
    تاريخ التسجيل
    Nov 2003
    المشاركات
    367


    هلا اخوي BIOs

    دائماً تتحفنا بأفضل المواضيع .. الله يعطيك ألف عافيه
    الله يعافيك أخي



    ياخي روح الله يوفقك ويجزاك الف خير !!
    تسلم ويجيزينا ويجزيكم الخير يا رب





    __________________
    لسنا أول من عبر المحيط

  8. #8
    عضو جديد
    تاريخ التسجيل
    Aug 2007
    المشاركات
    24


    موضوع رائع للاستفاده تم رفعه






  9. #9
    عضو فعال جدا
    تاريخ التسجيل
    Feb 2000
    المشاركات
    3,248


    راحت المرفقات






  10. #10
    عضو فعال
    تاريخ التسجيل
    Mar 2005
    المشاركات
    1,482


    سكربت ممتاز جدا وتمت تجربتة ونتائجة ممتازة





    __________________

    D0 Th3 B3$T 2B Th3 B3$T !
    L1nux - L1f3 Fr33 0R D13

  11. #11


    منعاً لضياع رابط ملف السكربت ولقوة فائدة هذه السكربت

    فقد تم تحميله ورفعه بالمرفقات .. وعذراً لصاحب الموضوع على ذلك

    وشكراً لكم





    الملفات المرفقة الملفات المرفقة
    __________________
    تابعني على Twitter

  12. #12
    عضو جديد
    تاريخ التسجيل
    Apr 2010
    المشاركات
    6


    بارك فك يالغالي

    وهذه النتائج عندي ممكن احد بس يضبط الملف





    كود PHP:
            -- MYSQL PERFORMANCE TUNING PRIMER --
                 - 
    ByMatthew Montgomery -

    MySQL Version 5.0.92-community-log x86_64

    Uptime 
    2 days 9 hrs 13 min 58 sec
    Avg
    qps 78
    Total Questions 
    16218384
    Threads Connected 
    14

    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 = 10 sec.
    You have 41175 out of 16218532 that take longer than 10 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 = 4
    Current threads_cached = 2
    Current threads_per_sec = 3
    Historic threads_per_sec = 3
    Threads created per/sec are overrunning threads cached
    You should raise thread_cache_size

    MAX CONNECTIONS
    Current max_connections = 400
    Current threads_connected = 16
    Historic max_used_connections = 227
    The number of used connections is 56% of the configured maximum.
    Your max_connections variable seems to be fine.

    INNODB STATUS
    Current InnoDB index space = 208 K
    Current InnoDB data space = 144 K
    Current InnoDB buffer pool free = 90 %
    Current innodb_buffer_pool_size = 8 M
    Depending on how much space your innodb indexes take up it may be safe
    to increase this value to up to 2 / 3 of total system memory

    MEMORY USAGE
    Max Memory Ever Allocated : 9.89 G
    Configured Max Per-thread Buffers : 15.77 G
    Configured Max Global Buffers : 970 M
    Configured Max Memory Limit : 16.71 G
    Physical Memory : 23.52 G
    Max memory limit seem to be within acceptable norms

    KEY BUFFER
    Current MyISAM index space = 748 M
    Current key_buffer_size = 768 M
    Key cache miss rate is 1 : 5166
    Key buffer free ratio = 68 %
    Your key_buffer_size seems to be fine

    QUERY CACHE
    Query cache is enabled
    Current query_cache_size = 192 M
    Current query_cache_used = 17 M
    Current query_cache_limit = 64 M
    Current Query cache Memory fill ratio = 9.23 %
    Current query_cache_min_res_unit = 4 K
    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 
    16 M
    Current read_rnd_buffer_size 
    8 M
    Sort buffer seems to be fine

    JOINS
    Current join_buffer_size 
    16.00 M
    You have had 9 queries where a join could not 
    use an index properly
    join_buffer_size 
    >= 4 M
    This is not advised
    You should enable 
    "log-queries-not-using-indexes"
    Then look for non indexed joins in the slow query log.

    OPEN FILES LIMIT
    Current open_files_limit 
    12288 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 
    4096 tables
    You have a total of 862 tables
    You have 1490 open tables
    .
    The table_cache value seems to be fine

    TEMP TABLES
    Current max_heap_table_size 
    256 M
    Current tmp_table_size 
    256 M
    Of 1691235 temp tables
    8were created on disk
    Created disk tmp tables ratio seems fine

    TABLE SCANS
    Current read_buffer_size 
    128 K
    Current table scan ratio 
    24397 1
    You have a high ratio of sequential access requests to SELECTs
    You may benefit from raising read_buffer_size 
    and/or improving your use of indexes.

    TABLE LOCKING
    Current Lock Wait ratio 
    12
    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'
    If you have a high concurrency of inserts on Dynamic row-length tables
    consider setting '
    concurrent_insert=2'. 
    وهذا الملف

    كود PHP:
    [mysqld]

    local-infile=0

    max_connections
    =400
    max_user_connections
    =150

    query_cache_type
    =1
    query_cache_limit
    =64M
    query_cache_size
    =192M

    interactive_timeout
    =60
    wait_timeout
    =60
    connect_timeout
    =10
    table_cache
    =4096
    open_files_limit
    =12288

    join_buffer_size
    =16M
    key_buffer
    =768M
    sort_buffer_size
    =16M
    read_rnd_buffer_size
    =8M

    thread_concurrency
    =2
    thread_cache
    =16
    thread_cache_size
    =4

    tmp_table_size
    =256M
    max_heap_table_size
    =256M
    log
    -slow-queries =/var/lib/mysql/slow 











ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  

أضف موقعك هنا| اخبار السيارات | حراج | شقق للايجار في الكويت | بيوت للبيع في الكويت | دليل الكويت العقاري | مقروء | شركة كشف تسربات المياه | شركة عزل اسطح بالرياض | عزل فوم بالرياض| عزل اسطح بالرياض | كشف تسربات المياة بالرياض | شركة عزل اسطح بالرياض