何时开始网站性能调整

发布于 2024-08-08 08:10:00 字数 1432 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

夜声 2024-08-15 08:10:00

当您开始注意到性能问题时。

When you start noticing performance issues.

瑾兮 2024-08-15 08:10:00

您可以做一些非常简单的事情来提高性能,只需很少的工作,做这些事情会更容易,看看您是否需要这样做;)

首先也是最重要的是将所有静态图像和其他媒体放在单独的服务器上。这消除了对运行 Web 服务器动态部分的 boxen 的大量查询。

接下来是确保您使用尽可能多的硬盘驱动器轴。当然,您希望数据库位于单独的计算机上,更不用说单独的硬盘驱动器上,但您也希望将 Web 服务器日志写入单独的硬盘驱动器上。这可以防止硬盘磁头频繁跳动。

至于“你如何知道何时需要性能调整”,我会给出与 George Stocker 不同的答案:当与性能相关的成本超过研究它的成本时。我这样说是因为如果您的网站有点缓慢,您的客户可能会有点不高兴,但如果它不阻止任何人使用它,或向其他人推荐它,那么它可能不值得研究。人们总是忍受次优的表现。

There are some very easy things you can do to increase performance with so little work, it's easier to do them that see if you need to yet ;)

First and foremost is putting all static images and other media on a separate server. That eliminates a whole lot of queries on the boxen running the dynamic parts of the web server.

Next in line is make sure you are using as many hard drive spindles as possible. Of course you want your database on a separate machine, let alone a separate hard drive, but you also want your web server logs written to a separate hard drive. That prevents a lot of jumping around of the hard drive heads.

As far as "how do you know when you need to performance tune", I will give a different answer than George Stocker: When there is a cost associated with your performance that outstrips the cost of looking into it. I say it this way because your customers may be a little unhappy if your website is a little sluggish, but if it doesn't prevent anyone from using it, or recommending it to others, then it may not be worth looking into. People put up with sub-optimal performance all the time.

自我难过 2024-08-15 08:10:00

有大量工具可用于解决大量可能的瓶颈。良好的性能调优策略始于对给定系统的测量和一致的检测。

但性能调整需要宝贵的时间和资源,并且只有在它为您带来最大效益时才应进行,即在给定所需工作的情况下,它为实现网站目标提供了最大的改进。如果您的网站支持(或)一个企业或组织,您必须不断评估业务前景并规划下一步的资源分配。这完全取决于特定的行业。

工程师可能会专注于现有系统的不断完善,但项目专员(无论是外部客户还是公司管理层)必须权衡所有类型开发的成本和收益,从改进现有功能集到添加新功能,解决影响产品可用性的技术限制(包括性能问题)。这并不是说工程师在资源分配方面没有发言权,但他们的观点只是促成成功的众多观点之一。

There are a plethora of tools available to address the plethora of possible bottlenecks. A decent performance tuning strategy starts with measurement and consistent instrumentation of the given system.

But performance tuning requires precious time and resources, and should only be pursued when it gives you the most bang for the buck, i.e. it provides the greatest improvement to achieving your website's objectives given the work required. If your website supports (or is) a business or organization, you must continuously evaluate the business landscape and plan the next allocation of resources. This is entirely dependent on the particular industry.

An engineer might focus on continual refinement of an existing system, but the project commissioners (be they an external client, or your company's management) must weigh the costs and benefits of all types of development, from improving an existing featureset, to adding new features, to addressing technical limitations affecting product usability (including performance issues). That's not to say engineers have no say in resource allocation, but their perspective is just one of many contributing to success.

暖树树初阳… 2024-08-15 08:10:00

当您怀疑网站能否承受最大使用量翻倍时。我的一个常见想法是,您应该具有支持至少 2 倍于您期望的用户数量的性能能力。

不过,确定是否可以支持 2x 最好留给负载测试,而不是猜测。不过,您的另一条评论中的一条评论是:网站性能问题很可能会影响使用该网站的每个人,包括您在本地计算机上......除非它是带宽问题并且您连接到本地网络。除非切断电缆,否则“只有亚洲人民”会受到影响。

When you have doubts that the website would survive a doubling in max usage. One common line of thought where I am from is that you should have the performance capacity to support at least 2x the number of users you expect.

Determining whether or not you can support 2x is something better left to load testing though, rather then speculation. One comment from your other comment though: chances are a website performance problem is going to affect everyone using the web site, including you on a local machine... unless it's a bandwidth problem and you're connected to a local network. Barring cable cuttings, it's not going to be 'just the people in Asia'.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文