Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 5 of 5

This is a discussion on VPS - Which PHP Cache Should I install and how in the VPS & Dedicated forum
I need to install a php cache. Maybe APC (Alternative PHP Cache)? Which one is best? Any suggestions about how to install it? My php ...

  1. #1
    Loyal Client
    Join Date
    Jan 2005
    Posts
    159

    VPS - Which PHP Cache Should I install and how

    I need to install a php cache. Maybe APC (Alternative PHP Cache)?

    Which one is best?
    Any suggestions about how to install it?

    My php software is only about 2mb - so I'm hoping that I could
    1) have it all stored as op codes in the memory

    and perhaps
    2) have it all stored in memory period (eg. no file loads). Though maybe this is a waste of RAM?

    Aaron

  2. #2
    JPC Dream Team
    Join Date
    Mar 2009
    Posts
    925
    Hi Aaron,

    APC is a good option. You can find the installation tutorial here.

    http://php.net/apc.setup

    You can also consider eaccelerator as an another alternative. Take a look at the list of php accelerators here.

    http://en.wikipedia.org/wiki/List_of_PHP_accelerators

    Please open a ticket with support, if you need any assistance on php accelerator installation.
    Anoop
    Support Department
    JaguarPC.com

  3. #3
    Loyal Client
    Join Date
    Jan 2005
    Posts
    159
    I'm running suPHP. Apparently that doesn't work with APC.

    Should I use another cache system, or is there a way I can get APC to work with suPHP?

    Could I do something like have all the of scripts for my software run under the same user so that they could share the cache? (Eg. if my domain is running 5 php sofware packages, create a special user for each of them - so this would make it less secure, but allow for caching.) If this is possible, how would I do it? Could I define all the scripts in a directory to run under a specific user?

    I'm interested in doing this because loading my 1-2mb php software takes 500ms (all the require_once() statements for my 10-20 libraries).

    My entire software package is about 3mb. So I'd love to have it all converted into opcodes and stored in memory.

  4. #4
    Loyal Client
    Join Date
    Jan 2005
    Posts
    159
    So the load time is more around 400ms.

    120 ms is connecting to the database (my ping time between the database server and the webserver is 35-40 ms as they are in different locations)

    Otherwise, the slow time problem seems to come from having functions that aren't in classes and defining global arrays (I have a lot of global variables).

  5. #5
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,312
    I'd bet there's a PHP to C converter out there somewhere.
    Good luck

Bookmarks

Posting Permissions

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