memcached

Memcached using more than max memory

最后都变了- 提交于 2019-12-08 01:36:52
问题 i have an installation on memcache which i want to use in my production environment but when i have ran a couple of tests it seems that memcache doesn't free up memory even after it has used up all of it allocated memory, Also i logged in and ran a flush_all command but the objects are still in the cache. Here are outputs from some tests memcached-tool memcache-top v0.6 (default port: 11211, color: on, refresh: 3 seconds) INSTANCE USAGE HIT % CONN TIME EVICT/s READ/s WRITE/s 127.0.0.1:11211

PHP memcache returns false with increase in number of keys

℡╲_俬逩灬. 提交于 2019-12-07 21:55:05
问题 We are working with PHP and are using memcached v1.4.6 for caching. We are using memcache extension memcache-2.2.6 from PECL. We are using persistent connection to connect to memcached. Recently we made some changes that has doubled the number of keys stored in memcached. These keys are at max 75 to 80 characters long. The values stored are integers. Whenever we try working with the new code, the system works fine for the first few seconds (usually less than 10 seconds). After the first few

ndb Models are not saved in memcache when using MapReduce

别来无恙 提交于 2019-12-07 21:07:31
问题 I've created two MapReduce Pipelines for uploading CSVs files to create Categories and Products in bulk. Each product is gets tied to a Category through a KeyProperty. The Category and Product models are built on ndb.Model, so based on the documentation, I would think they'd be automatically cached in Memcache when retrieved from the Datastore. I've run these scripts on the server to upload 30 categories and, afterward, 3000 products. All the data appears in the Datastore as expected. However

Prevent cache miss warnings with perform_caching on

泄露秘密 提交于 2019-12-07 19:26:36
问题 I'm experimenting with caching in my Rails 3.2 app and enabled caching by adding this to my development.rb file: config.action_controller.perform_caching = true Caching works as expected, except that when I load any page the console shows tons of these log entries: Completed 200 OK in 1006ms (Views: 249.2ms) cache: [GET /assets/jquery_ujs.js?body=1] miss cache: [GET /assets/chosen.jquery.min.js?body=1] miss cache: [GET /assets/bootstrap/bootstrap-tooltip.js?body=1] miss cache: [GET /assets

在Windows中安装Memcached

こ雲淡風輕ζ 提交于 2019-12-07 18:47:49
Memcached是一个高并发的内存键值对缓存系统,它的主要作用是将数据库查询结果,内容,以及其它一些耗时的计算结果缓存到系统内存中,从而加速Web应用程序的响应速度。 Memcached最开始是作为Linux应用程序被安装在Linux服务器上来使用的,不过自从开源之后,它又被重新编译以适用于Windows环境。 Jellycan 和 Northscale 两个站点都提供了Windows的二进制可执行文件下载,下面是下载的地址: http://code.jellycan.com/files/memcached-1.2.5-win32-bin.zip http://code.jellycan.com/files/memcached-1.2.6-win32-bin.zip http://downloads.northscale.com/memcached-win32-1.4.4-14.zip http://downloads.northscale.com/memcached-win64-1.4.4-14.zip http://downloads.northscale.com/memcached-1.4.5-x86.zip http://downloads.northscale.com/memcached-1.4.5-amd64.zip 在1.4.5版本之前

memcached vm ubuntu window java访问

我的未来我决定 提交于 2019-12-07 16:35:06
编译前,请先确认gcc、make、patch等编译工具是否已安装,并可正常使用。 资源包: 1. libevent Libevent是一个异步事件处理软件函式库,以BSD许可证释出。Memcached依赖Libevent,因此必须先编译安装Libevent。 下载地址: http://http://www.monkey.org/~provos/libevent-2.0.13-stable.tar.gz wget http: // www.monkey.org / ~provos / libevent-2.0.13-stable.tar.gz tar xzvf libevent-2.0.13-stable.tar.gz ./configure make sudo make install 检测libevent 安装是否成功,输入:# ls -al /usr/lib | grep libevent 2.mecached 不错的文章 http://www.mike.org.cn/articles/ubuntu-install-memcached/ 3.java客户端 http://www.couchbase.org/code/couchbase/java memcached-2.7.jar jettison-1.1.jar http://www.docjar.com/jar_detail

redis&memcached&SQL&NoSQL

丶灬走出姿态 提交于 2019-12-07 16:26:03
Why 一个应用肯定有两部分逻辑:数据逻辑和业务逻辑。 数据逻辑包括各种I/O,和内部的数据的处理,也就是在内部如何组织数据结构,变量也属于这一部分。 当一个应用变成一个进程,它负责数据逻辑的部分就有了两个选择: 将数据存在内存中,存在内存中的数据如果变得很重要,就需要保存进磁盘,所以有可能需要持久化的逻辑。为了更好的使用数据,需要有很好的数据结构建模,虽然基本的数据结构,甚至一些复杂的在程序语言或者库中都有集成,但是语言不负责执行,所以执行这一块还是进程自己在做。 将数据存在磁盘中,这需要有存/取得逻辑,在取的这一部分,基于业务可能要有强大的检索逻辑 当应用的数据规模变得很大,相应的数据逻辑和业务逻辑也会变得很复杂 从效率上来说,是时候考虑分布式了,所以我们有必要将和数据有关的逻辑独立出去,比如磁盘上的检索,内存中数据的持久化等。 从开发和维护的角度来说,集中精力在业务而不是数据,可以使得代码量变少,开发速度和可维护性都大大提高。 How 显然要将数据逻辑尽可能独立出去,就要用到工具软件,redis、memcached、Sql,NoSql都是这个目的的工具 redis、memcached 侧重于内存中的数据 内存中的数据都有时效性,所以这两个工具都支持expire memcached 只负责 数据的存、取和超时,在取得部分也不考虑复杂得检索逻辑 redis则更强大

Memcached启动参数详解

吃可爱长大的小学妹 提交于 2019-12-07 14:44:51
memcached -d -m 1024 -l 192.168.100.101 -p 11211 -P /tmp/memcached.pid -c 1024 -f 1.25 -n 80 -t 16 运行参数描述 -d :以守护(daemon)进程方式启动; -u :是运行Memcache的用户,例如 -u memcached; -P :保存Memcache的pid文件; 内存设置 -m :分配给Memcache使用的内存数量,单位是MB; -M :内存不够时禁止LRU,直接报错; -n :初始chunk=key+suffix+value+32结构体,默认48字节; -f :是chunk的增长因子,默认: 1.25 -L :修改内存page尺寸,默认1M,如果要保存大对象,这个参数必须要修改; 连接设置 -l :监听的服务器IP地址; -p :监听的服务器端口,默认是11211 ; -U :UDP监听端口,默认是11211 ; 并发设置 -t :线程数,默认是4,可以根据CPU核数设置,注意,此参数特别关键,设置数量不能超过服务器CPU总核数,超过会有WARNING: Setting a high number of workerthreads is not recommended.Set this value to the number of cores in your

Protobuf-net memcache provider null type error on deserialize

痞子三分冷 提交于 2019-12-07 12:16:22
问题 I'm using lastest protobuf-net lib with protobuf-net memcache provider. I need to serialize list of custom type MyClass [ProtoContract] public class MyClass{ [ProtoMember(1)] public int a {get; set;} [ProtoMember(2)] public int b {get; set;} } So I need to store/retreive: List<MyClass> myList When values are stored through protobuf and then retreived from cache all goes well. But if value is stored in memcache (in correct protobuf format) i.e. from another thread/app and after that that value

why does memcached not support “multi set”

二次信任 提交于 2019-12-07 12:14:39
问题 Can anyone explain why memcached folks decided to support multi get but not multi set. By multi I mean operation involving more than one key (see protocol at http://code.google.com/p/memcached/wiki/NewCommands). So you can get multiple keys in one shot (basic advantage is the standard saving you get by doing less round trips) but why can not you get bulk sets? My theory is that it was meant to do less number of sets and that too individually (e.g. on a cache read and miss). But I still do not