开发者

Using shared memory on a shared hosting Linux account

I want to optimize the access to some files that are always read by my custom script, using the shared memory functions of PHP. But there are some questions I have:

  • In a shared hosting开发者_JS百科 (like GoDaddy's Linux Unlimited Hosting), is a single computer executing all of the script's instances, or could there be several computers due to load balancing?
  • If there are several computers executing the script, is the same shared memory accessed by all of them?
  • And, how much shared memory is it possible to allocate? I'd like to load some megabytes of data.

Best regards!


  1. There could be multiple if they are doing load balancing, you would have to ask them.
  2. No, shared memory is shared across the current host, not multiple
  3. Depends on system ram and limits in place by the system administrator.

A better solution would probarbly be to create a MySQL table with the engine type of HASH, which makes it a memory table. This would work around the issue of load balanced setups and also keep your data away from other users on the same server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜