Results 1 to 4 of 4

Thread: xcache and OOM

  1. #1
    Join Date
    Oct 2009

    xcache and OOM


    php 5.3.x
    Xcache: 1.3.0

    Can someone please help me to fix high OOM?

    Why I am getting OOM's even though I have plenty of memory according to stats?

    My xcache settings:
    zend_extension = /usr/lib/php5/20090626/
    xcache.admin.enable_auth = On
    xcache.shm_scheme =        "mmap"
    xcache.size  =  192M
    xcache.count = 8
    xcache.slots =                8K
    xcache.ttl   =  3200
    xcache.gc_interval = 21600
    xcache.var_size  =            64M
    xcache.var_count =             8
    xcache.var_slots =            8K
    xcache.var_ttl   =             0
    xcache.var_maxttl   =          0
    xcache.var_gc_interval =     300
    xcache.test =                Off
    xcache.readonly_protection = Off
    xcache.mmap_path =    "/dev/zero"
    xcache.coredump_directory =   ""
    xcache.cacher =               On
    xcache.stat   =               On
    xcache.optimizer =           Off
    xcache.coverager =          Off
    xcache.coveragedump_directory = ""
    Attached Thumbnails Attached Thumbnails xcache.png  

  2. #2
    Join Date
    Oct 2009
    Your cache is getting fragmented. Divert some memory from varcache to phpcache, and reduce xcache.count to, say, 4.

  3. #3
    Join Date
    Oct 2009
    Question: Is xcache.size = phpcache? If yes, then it also has empty memory. Do i need to assign it more?

    Also, how come var cache just uses 2Mb memory while before it was using more in 5.2.x ?

    How do I stop fragmentation?

  4. #4
    Join Date
    Oct 2009
    Yes, xcache.size is what I call phpcache.

    Varcache may be using less memory because of efficiencies introduced in 5.3.x; it's not easy to tell without innate knowledge of the script's intricacies.

    The easiest way to reduce fragmentation while not increasing memory allocation is to reduce xcache.count. (I suggested reducing it to 4 in my previous post.) Because of how data is stored in the cache, not all will be used when you start getting OOMs - it's just that the chunk of data you are trying to store doesn't fit in any of the spaces free.

    Think of it like a parking lot. While there is much free space when you count all the spaces in between the cars as a whole, you can't fit anything much bigger than a bike between any two adjacent cars.

    If you have free memory lying about, though, it definitely doesn't hurt to increase xcache.size.

Similar Threads

    By stablehost in forum WebHostingTalk Subscribers Club
    Replies: 6
    Last Post: 12-20-2010, 09:43 AM
  2. IIS7+Plesk9+Xcache = Half working Xcache
    By AdamD in forum Hosting Security and Technology
    Replies: 0
    Last Post: 11-09-2009, 01:05 PM
  3. OOM killed process httpd
    By Webberzone in forum VPS Hosting
    Replies: 10
    Last Post: 12-01-2008, 04:42 PM
  4. How to prevent OOM (Out Of Memory) crashes?
    By Netarch in forum Hosting Security and Technology
    Replies: 6
    Last Post: 08-19-2008, 08:03 PM
  5. 15minuteservers.oom help
    By andrewk in forum Dedicated Server
    Replies: 7
    Last Post: 07-24-2004, 08:14 AM

Posting Permissions

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