1.慢查询日志:slow_launch_time=2
查询大于某个时间的值(单位:s)slow_query_log=on/off
开启关闭慢查询日志slow_query_log_file=/opt/data/host-slow.log
慢查询日志位置2.连接数:max_connections MyS...
分类:
数据库 时间:
2014-05-15 21:44:08
阅读次数:
447
1.慢查询日志:slow_launch_time=2查询大于某个时间的值(单位:s)slow_query_log=on/off开启关闭慢查询日志slow_query_log_file=/opt/data/host-slow.log慢查询日志位置2.连接数:max_connectionsMySQL最大连接数back_log当连接数满了后,设置一个值,允许多少个连接进入等待堆..
分类:
数据库 时间:
2014-05-15 12:44:41
阅读次数:
385
一个简单的consistent hashing的例子,很容易理解。
首先有一个设备类,定义了机器名和ip:
public class Cache
{
public String name;
public String ipAddress;
}
然后是主要的实现:
public class Shard {
//hash 算法并不是保证绝对的平衡,如果 cache 较少的话,...
分类:
其他好文 时间:
2014-05-15 06:56:41
阅读次数:
370
第一次使用ModelAdmin.date_query,在admin.py中添加后,出现了这样的错误
ImproperlyConfigured exception (pytz isn't installed)
使用以下命令安装pytz之后,问题依然没有解决
$sudo pip install pytz
根据搜索结果,原来需要把settings.p中的USE_TZ = True修改为USE_T...
分类:
其他好文 时间:
2014-05-15 03:42:23
阅读次数:
224
dblink = @$func($dbhost,$dbuser,$dbpw) ; if ($halt
&& !$this->dblink) { $this->halt("无法链接数据库!"); } //设置查询字符集
mysql_query("SET character_set_connection...
分类:
数据库 时间:
2014-05-14 22:52:20
阅读次数:
461
hive执行query语句时提示错误:org.apache.hadoop.ipc.RemoteException: java.io.IOException: java.io.IOException:...
分类:
编程语言 时间:
2014-05-14 21:49:08
阅读次数:
378
phpheader()中的cache有四种标识头:Last-Modified,Expires,Pragma:no-cache,Cache-Control。以下的测试环境为谷歌浏览器,其余的未测试Last-Modified:在判断缓存的时候,If-Modified-Since会将此值发送给服务器。Expires:后面的日期用于标识缓存在什么时候过期Pragma:尽量用Cac..
分类:
Web程序 时间:
2014-05-14 19:06:02
阅读次数:
323
fieldValueCache默认是存在的。如果没有在solrConfig.xml中配置,那么其初始大小10,最大10000,不会autowarm。在PC上开发时,会有内存溢出的风险。
分类:
其他好文 时间:
2014-05-14 16:35:14
阅读次数:
231
linux执行free命令显示如下:[root@Linux~]#free
totalusedfreesharedbufferscached
Mem:805434418346246219720060528369948
-/+buffers/cache:14041486650196
Swap:524280144524136第1行total内存总数:8054344used已经使用的内存数:1834624free空闲的内存数:6219720shared当前..
分类:
系统相关 时间:
2014-05-14 15:56:09
阅读次数:
329
一、Varnish简介Varnish是一款高性能、开源的反向代理服务器和缓存服务器,其开发者Poul-HenningKamp是FreeBSD核心的开发人员之一。Varnish主要运行两个进程:Management进程和Child进程(也叫Cache进程)。Management进程主要实现应用新的配置、编译VCL、监控varnish、初始化var..
分类:
其他好文 时间:
2014-05-14 15:46:59
阅读次数:
448