Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 36329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:22:33+00:00 2026-05-10T14:22:33+00:00

Why is there a hardcoded chunk limit (.5 meg after compression) in memcached ?

  • 0

Why is there a hardcoded chunk limit (.5 meg after compression) in memcached? Has anyone recompiled theirs to up it? I know I should not be sending big chunks like that around, but these extra heavy chunks happen for me from time to time and wreak havoc.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:22:34+00:00Added an answer on May 10, 2026 at 2:22 pm

    This question used to be in the official FAQ

    What are some limits in memcached I might hit? (Wayback Machine)

    To quote:

    The simple limits you will probably see with memcache are the key and item size limits. Keys are restricted to 250 characters. Stored data cannot exceed 1 megabyte in size, since that is the largest typical slab size.’

    The FAQ has now been revised and there are now two separate questions covering this:

    What is the maxiumum key length? (250 bytes)

    The maximum size of a key is 250 characters. Note this value will be less if you are using client ‘prefixes’ or similar features, since the prefix is tacked onto the front of the original key. Shorter keys are generally better since they save memory and use less bandwidth.

    Why are items limited to 1 megabyte in size?

    Ahh, this is a popular question!

    Short answer: Because of how the memory allocator’s algorithm works.

    Long answer: Memcached’s memory storage engine (which will be pluggable/adjusted in the future…), uses a slabs approach to memory management. Memory is broken up into slabs chunks of varying sizes, starting at a minimum number and ascending by a factorial up to the largest possible value.

    Say the minimum value is 400 bytes, and the maximum value is 1 megabyte, and the factorial is 1.20:

    slab 1 – 400 bytes slab 2 – 480 bytes slab 3 – 576 bytes … etc.

    The larger the slab, the more of a gap there is between it and the previous slab. So the larger the maximum value the less efficient the memory storage is. Memcached also has to pre-allocate some memory for every slab that exists, so setting a smaller factorial with a larger max value will require even more overhead.

    There’re other reason why you wouldn’t want to do that… If we’re talking about a web page and you’re attempting to store/load values that large, you’re probably doing something wrong. At that size it’ll take a noticeable amount of time to load and unpack the data structure into memory, and your site will likely not perform very well.

    If you really do want to store items larger than 1MB, you can recompile memcached with an edited slabs.c:POWER_BLOCK value, or use the inefficient malloc/free backend. Other suggestions include a database, MogileFS, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 98k
  • Answers 98k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The main problem you have is that the view contains… May 11, 2026 at 7:34 pm
  • Editorial Team
    Editorial Team added an answer This is why they recommend you don't call non-final methods… May 11, 2026 at 7:34 pm
  • Editorial Team
    Editorial Team added an answer From a quick view into the source code: No it… May 11, 2026 at 7:34 pm

Related Questions

I'm writing a Win32 service in C++. I have a custom Assert macro that
The situation: I need to convert our current development environment from Windows XP 32-bit to
I want to write a function that accepts a parameter which can be either
By default, when you sudo gem install thegemname it will install executables into /usr/bin/

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.