简体   繁体   English

缩放phpBB?

[英]Scaling phpBB?

I'm looking to scale an existing phpBB installation by separating the read queries from the write queries to two separate, replicated MySQL servers.我希望通过将读取查询与写入查询分离到两个单独的、复制的 MySQL 服务器来扩展现有的 phpBB 安装。 Anyone succeeded in doing this, specifically with phpBB?任何人都成功地做到了这一点,特别是 phpBB?

The biggest concern I have so far is that it seems like the queries are scattered haphazardly throughout the code.到目前为止,我最大的担忧是查询似乎散布在整个代码中。 I'd love to hear if anyone else did this, and if so, how it went / what was the process.我很想听听其他人是否这样做,如果是这样,它是如何进行的/过程是什么。

You could try MySQL Proxy which would be an easy way to split the queries without changing the application.您可以尝试MySQL 代理,这将是一种在不更改应用程序的情况下拆分查询的简单方法。

Just add more RAM.只需添加更多 RAM。 Enough RAM to hold the entire database.足够的 RAM 来容纳整个数据库。 You'll be surprised how fast your inefficient script will fly.您会惊讶于您的低效脚本的运行速度有多快。 Memory forgives a lot of database scaling mistakes. Memory 原谅了很多数据库缩放错误。

I know this was asked a long time ago, but I'd like to share what I experienced, in case it can help anyone.我知道这是很久以前问过的,但我想分享我的经历,以防它可以帮助任何人。

If your problem are table locks, and knowing that the default storage engine of phpbb in that day was MyISAM, have you looked at moving to InnoDB storage engine?如果您的问题是表锁,并且知道当时 phpbb 的默认存储引擎是 MyISAM,您是否考虑过迁移到 InnoDB 存储引擎?

Just find out which tables are most frequently locked, and convert those to InnoDB.只需找出哪些表最常被锁定,然后将它们转换为 InnoDB。 The sessions table is the first candidate here, although you may want to look at other optimizations (such as storing session data only in memcache or something) if that is your main bottleneck. session 表是这里的第一个候选者,尽管如果这是您的主要瓶颈,您可能希望查看其他优化(例如仅将 session 数据存储在 memcache 或其他东西中)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM