Results 1 to 8 of 8
  1. #1

    more memory more quickly?

    if a shared hosting is memory php limit 256MB
    it will load fast?
    #My Blog is on hostgator shared baby plan.
    5K visitor per day.
    #Disable awstats, webalizer for saving CPU usage.

  2. #2
    Join Date
    Oct 2007
    Posts
    4,033
    Are you stating about the PHP memory_limit?
    Aspiration Hosting [US UK SG AU] - Cloud Web Hosting | Managed Cloud Server
    LiteMage / LiteSpeed Cache for Magento, WordPress, Joomla, Drupal & XenForo

    Web Development Support Unmetered Bandwidth Aspiration CDN Magento Optimized

  3. #3
    Quote Originally Posted by JLHC View Post
    Are you stating about the PHP memory_limit?
    yes
    ----------
    if the same scripts, put to 32MB machine, another put to 256MB.
    if traffic 10 visitors in one day, what's different?
    #My Blog is on hostgator shared baby plan.
    5K visitor per day.
    #Disable awstats, webalizer for saving CPU usage.

  4. #4
    Join Date
    Apr 2007
    Posts
    3,513
    The PHP memory limit isn't something that effects your speed.

    It's just really a safety net to stop a single script using too much memory on your server.
    - Buying up websites, side-projects and companies - PM Me! -

  5. #5
    Join Date
    Jun 2003
    Location
    California
    Posts
    2,766
    Quote Originally Posted by adulu View Post
    yes
    ----------
    if the same scripts, put to 32MB machine, another put to 256MB.
    if traffic 10 visitors in one day, what's different?
    My understanding is a bit different from the others here, so I'm interested to see if they agree with me when I clarify.

    The memory allotted to PHP should be high enough for the scripts you want to run on your account. For instance, some forum software will run on 16M just fine. Wordpress "likes" 32M but multiple user Wordpress "likes" 64M.

    PHP based programs will indeed seem to load faster if they have more php memory. If they don't have enough memory, they may seem to "hang" while they wait for the tasks ahead of them to complete. Running out of php memory can mean certain tasks don't complete; uploading and converting images can fail in Wordpress, for example.

    (Some hosts will let you change the PHP memory limit folder-by-folder, but its nice to have a generous allotment so you don't have to worry about it!)

  6. #6
    Join Date
    Nov 2006
    Location
    Karachi, Pakistan
    Posts
    1,349
    fshagan that is not how it works. As iTom correctly pointed out memory limit is merely a ceiling on memory usage by a single script. If the script hits that memory limit it will usually die of a fatal error immediately. So if there are delays they are not because of this memory limit because if this setting were the cause the application would outright crash. Also just because you set 256MB as the limit doesn't mean that every php script on the server is going to take up that much RAM. They use only as much as they need.
    Last edited by Website themes; 03-13-2011 at 04:28 PM.

  7. #7
    thanks all.

    if PHP memory_limit is 32MB, as long as scripts don't have fata error.
    it's fine enough?
    #My Blog is on hostgator shared baby plan.
    5K visitor per day.
    #Disable awstats, webalizer for saving CPU usage.

  8. #8
    Join Date
    Jun 2003
    Location
    California
    Posts
    2,766
    Quote Originally Posted by Website themes View Post
    fshagan that is not how it works. As iTom correctly pointed out memory limit is merely a ceiling on memory usage by a single script. If the script hits that memory limit it will usually die of a fatal error immediately. So if there are delays they are not because of this memory limit because if this setting were the cause the application would outright crash. Also just because you set 256MB as the limit doesn't mean that every php script on the server is going to take up that much RAM. They use only as much as they need.
    Well, my experience is not that scripts like Wordpress crash due to the memory limits, but a function will not complete, and the program takes a while to recover. It may be that an individual php script is crashing, but it doesn't always throw a fatal error and stop execution of Wordpress itself. This is pretty well documented in the Wordpress forums. But it may be a semantic issue because the wrapper script doesn't crash so what's behind the scenes is a crash of a child script, I guess.

    I do know that a script will only take the memory it needs, but the needs vary by program. A lot of shared hosts have PHP set at 8M or 16M. Having more memory allocated to PHP is a good thing, in my mind, as it allows a wider range of scripts to be considered.

Similar Threads

  1. PHP out of memory, though memory limit is high
    By RawrPeter in forum Hosting Security and Technology
    Replies: 22
    Last Post: 03-26-2010, 05:50 AM
  2. Committed memory higher than available memory on VPS
    By tnedator in forum Hosting Security and Technology
    Replies: 0
    Last Post: 02-15-2010, 02:27 PM
  3. 512MB Memory VPS... Out of memory already?
    By PaulM in forum VPS Hosting
    Replies: 23
    Last Post: 10-16-2009, 01:54 PM
  4. Out Of Memory problems. My server is down. Memory logs attached.
    By guarriman in forum Hosting Security and Technology
    Replies: 13
    Last Post: 10-18-2005, 10:01 PM
  5. Memory Eaten Quickly!
    By compady in forum Hosting Security and Technology
    Replies: 10
    Last Post: 05-31-2003, 08:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •