首页 > linux, mysql > ext4 mysql flush_log 相关

ext4 mysql flush_log 相关

2013年6月7日 eric 发表评论 阅读评论

最近有一些业务服务器开始使用6.3服务器,顾客开始说访问页面会卡,主要反映在切换页面,数据交互等,开始开始技术排查问题,同样的代码,同样的 apache mysql php 的配置,在 5.5 上运行很正常,在 6.3 运行就会卡。把问题转交到我手上,我开始对操作系统进行了排查。
发现 5.5 服务器内核是 2.6.18,6.3的服务器内核是 2.6.32。查看硬件配置也是一样的,查看两边的 mysql配置文件也一样,这时候我觉得是不是 6.3 与 5.5 开机挂载磁盘的参数不一样呢?

两边都执行 cat /proc/mounts 后发现6.3 多一个 barrier=1 参数 而 5.5 没有,经过 google 发现这个参数是 2.6.22 以上内核开始有的,barrier=1,可以保证文件系统在日志数据写入磁盘之后才写commit记录,但影响性能。但是我们的 mysql 有个参数是每次的操作都要flush日志,这样的话每次就要提交两次,一就是有序写入。我们之前都是无序写入,虽然提高了安全性能,但是降低了性能,权衡之后我还是把 mysql 的参数改为2,这样的话我最多能丢失上一秒的数据,在可控范围内innodb_flush_log_at_trx_commit = 2
这样 6.3 不会出现卡的情况了。

转载请注明:文章转载自:Eric's linux and nginx! (http://www.nginxs.com)
本文地址:http://www.nginxs.com/linux/511.html

分类: linux, mysql 标签: , ,
  1. 2018年8月18日23:18 | #1

    It is the best time to make some plans for the future and it’s time to
    be happy. I have learn this put up and if I
    could I wish to counsel you some fascinating issues or tips.
    Perhaps you can write next articles relating to this article.
    I want to read even more things approximately it!

  2. 2018年8月19日00:19 | #2

    I’m truly enjoying the design and layout of your blog.

    It’s a very easy on the eyes which makes it much more enjoyable for
    me to come here and visit more often. Did you hire out a developer to
    create your theme? Outstanding work!

  3. 2018年8月19日01:05 | #3

    Howdy, i read your blog occasionally and i own a similar
    one and i was just wondering if you get a lot of spam
    remarks? If so how do you prevent it, any plugin or anything you can suggest?
    I get so much lately it’s driving me mad so any support is very
    much appreciated.

  4. 2018年8月19日01:30 | #4

    Hey there, You have done a fantastic job. I will definitely
    digg it and personally suggest to my friends. I’m confident
    they’ll be benefited from this website.

  5. 2018年8月19日02:09 | #5

    I really like what you guys tend to be up too. Such
    clever work and coverage! Keep up the terrific works guys I’ve included you guys to blogroll.

  6. 2018年8月19日03:37 | #6

    Today, while I was at work, my cousin stole
    my apple ipad and tested to see if it can survive a 25 foot
    drop, just so she can be a youtube sensation. My apple ipad is now broken and she
    has 83 views. I know this is entirely off topic but I
    had to share it with someone!

  7. 2018年8月19日03:46 | #7

    Wonderful, what a blog it is! This webpage provides helpful data to us, keep it up.

  8. 2018年8月19日06:55 | #8

    Great article! We are linking to this great post on our site.
    Keep up the good writing.

  9. 2018年8月19日08:05 | #9

    Wonderful article! This is the type of information that are supposed to be
    shared across the web. Disgrace on Google for no
    longer positioning this put up upper! Come
    on over and seek advice from my site . Thank you =)

  10. 2018年8月19日11:11 | #10

    What a data of un-ambiguity and preserveness of valuable experience about unexpected emotions.

  11. 2018年8月19日11:46 | #11

    I needed to thank you for this great read!! I definitely loved every
    bit of it. I’ve got you bookmarked to check out new things you post…

  12. 2018年8月19日12:20 | #12

    Hi there, I enjoy reading through your article.
    I wanted to write a little comment to support you.

  13. 2018年8月19日15:36 | #13

    Hi there! I just wanted to ask if you ever have any trouble with hackers?
    My last blog (wordpress) was hacked and I ended up losing several weeks of hard
    work due to no backup. Do you have any methods
    to protect against hackers?

  14. 2018年8月19日19:09 | #14

    Do you have a spam issue on this site; I also am a blogger,
    and I was wanting to know your situation; we have developed some nice practices and we are looking to trade solutions with others, why not shoot me an e-mail if interested.

  15. 2018年8月19日22:38 | #15

    Touche. Solid arguments. Keep up the amazing spirit.

  16. 2018年8月19日23:07 | #16

    Hi there! I know this is kinda off topic but I was wondering if you
    knew where I could locate a captcha plugin for my comment form?

    I’m using the same blog platform as yours and I’m having difficulty finding one?

    Thanks a lot!

  17. 2018年8月19日23:35 | #17

    Post writing is also a excitement, if you be familiar with then you can write if not it is difficult to write.

  18. 2018年8月20日00:00 | #18

    We’re a group of volunteers and starting a new scheme in our community.
    Your site provided us with valuable information to work on.
    You have done an impressive job and our whole community will be thankful to you.

  19. 2018年8月20日01:16 | #19

    I am really enjoying the theme/design of your website.
    Do you ever run into any internet browser compatibility issues?
    A small number of my blog readers have complained about my blog not operating correctly in Explorer but looks
    great in Safari. Do you have any solutions to help fix this
    problem?

  20. 2018年8月20日02:48 | #20

    It’s actually very complicated in this busy life to listen news on TV, thus I simply use world wide web for
    that reason, and take the hottest information.

  21. 2018年8月20日03:02 | #21

    It’s enormous that you are getting ideas from this paragraph as well as from our discussion made here.

  22. 2018年8月20日05:42 | #22

    My brother recommended I might like this web site.
    He was entirely right. This post truly made my day.

    You cann’t imagine just how much time I had spent for this info!
    Thanks!

  23. 2018年8月20日06:16 | #23

    Hurrah, that’s what I was exploring for, what a information! present
    here at this blog, thanks admin of this web page.

  24. 2018年8月20日06:44 | #24

    Excellent way of explaining, and good paragraph to obtain data
    regarding my presentation subject matter, which i am going to present in school.

  25. 2018年8月20日07:31 | #25

    Appreciate this post. Will try it out.

  26. 2018年8月20日07:44 | #26

    Thanks very nice blog!

  27. 2018年8月20日10:41 | #27

    Do you have any video of that? I’d want to find out more details.

  28. 2018年8月20日10:42 | #28

    hi!,I love your writing so much! proportion we keep in touch
    more approximately your article on AOL? I need a specialist on this
    area to unravel my problem. Maybe that is you! Having a look ahead to look you.

  29. 2018年8月20日12:46 | #29

    It’s a shame you don’t have a donate button! I’d without a doubt donate to this superb blog!
    I suppose for now i’ll settle for book-marking and adding your RSS feed to my Google account.
    I look forward to fresh updates and will share this website with my Facebook group.
    Chat soon!

  30. 2018年8月20日20:02 | #30

    At this time I am going away to do my breakfast, afterward
    having my breakfast coming over again to read more news.

  31. 2018年8月21日00:33 | #31

    I every time used to study paragraph in news papers but now
    as I am a user of web therefore from now I am using net for articles, thanks to web.

  32. 2018年8月21日04:04 | #32

    hello!,I really like your writing very so much! percentage we be
    in contact more about your article on AOL? I need an expert in this space to solve my problem.
    May be that’s you! Looking ahead to look you.

  33. 2018年8月21日05:15 | #33

    Having read this I believed it was really informative.
    I appreciate you taking the time and energy
    to put this content together. I once again find myself
    personally spending a significant amount of time both reading and posting comments.
    But so what, it was still worth it!

  34. 2018年8月21日06:07 | #34

    You are so interesting! I do not believe I’ve read through anything
    like this before. So wonderful to find someone with some original
    thoughts on this issue. Really.. thank you for starting this up.
    This site is something that is required on the web, someone with a little originality!

  35. 2018年8月21日08:47 | #35

    Attractive section of content. I just stumbled upon your site and in accession capital to assert that I get in fact enjoyed
    account your blog posts. Anyway I will be subscribing to your feeds and
    even I achievement you access consistently quickly.

  36. 2018年8月22日17:11 | #36

    Dry ice blasting does not require drying time.

  37. 2018年8月22日18:33 | #37

    Bead blasting paint from a concrete curb.

  38. 2018年8月23日20:52 | #38

    Bead blasting paint from a concrete curb.

  39. 2018年8月25日08:52 | #39

    To realize this, sandblasting tools is used.

  40. 2018年8月25日16:13 | #40

    Sand blasting creates this floor profile.

  41. 2018年8月25日16:13 | #41

    To realize this, sandblasting tools is used.

  42. 2018年8月25日21:24 | #42

    Sandblasting is efficient price saving and messy.

  43. 2018年8月26日10:44 | #43

    Bead blasting paint from a concrete curb.

  44. 2018年8月26日23:21 | #44

    Dry ice blasting doesn’t require drying time.

  45. 2018年8月27日16:19 | #45

    Garnet is proven to be a quick and clean blast media.

  46. 2018年8月27日16:29 | #46

    There are several usages of sandblasting technique.

  47. 2018年8月27日22:50 | #47

    Sand blasting creates this surface profile.

  48. 2018年8月28日05:48 | #48

    Dry ice blasting doesn’t require drying time.

  49. 2018年9月8日20:52 | #49

    generic pills online http://7-24.biz/user/profile/1988 To buy.

  50. 2018年9月20日03:21 | #50

    I do not even understand how I stopped up right here, but I thought this publish used
    to be great. I don’t recognise who you might be however certainly you’re going to a well-known blogger when you aren’t already.
    Cheers!

评论分页
1 ... 14 15 16 511
订阅评论
1+7= (必填)