Durability is a database feature that guarantees the recording of committed transactions even if the server crashes or loses power. However, durability adds significant database overhead, so if your site does not require such a guarantee, PostgreSQL can be configured to run much faster. The following are configuration changes you can make to improve performance in such cases. Except as noted below,durability is still guaranteed in case of a crash of the database software; only abrupt operating system stoppage creates a risk of data loss or corruption when these settings are used.

• Place the database cluster’s data directory in a memory-backed file system (i.e. RAM disk). This

eliminates all database disk I/O, but limits data storage to the amount of available memory (and perhaps swap).

• Turn off fsync; there is no need to flush data to disk.

• Turn off synchronous_commit; there might be no need to force WAL writes to disk on every commit.

This setting does risk transaction loss (though not data corruption) in case of a crash of the

database.

• Turn off full_page_writes; there is no need to guard against partial page writes.

• Increase checkpoint_segments and checkpoint_timeout ; this reduces the frequency of checkpoints,

but increases the storage requirements of /pg_xlog.

• Create unlogged tables to avoid WAL writes, though it makes the tables non-crash-safe.

[root@DELL-R720 data]# cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

2

[root@DELL-R720 data]# cat /proc/cpuinfo| grep "cpu cores"| uniq

cpu cores : 6

[root@DELL-R720 data]# cat /proc/cpuinfo| grep "processor"| wc -l

24

[root@DELL-R720 data]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

24  Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz

PostgreSQL 非持久化设置(Non-Durable Settings)的更多相关文章

  1. JMS学习(五)--ActiveMQ中的消息的持久化和非持久化 以及 持久订阅者 和 非持久订阅者之间的区别与联系

    一,消息的持久化和非持久化 ①DeliveryMode 这是传输模式.ActiveMQ支持两种传输模式:持久传输和非持久传输(persistent and non-persistent deliver ...

  2. RabbitMQ学习笔记(6)----RabbitMQ 持久化和非持久化

    持久化:将交换机或队列数据保存到磁盘,服务器宕机或重启之后依然存在. 非持久化:将交换机或队列的数据保存到内存中,服务器宕机或重启之后数据将不存在. 在RabbitMQ中也提供了持久化和非持久化方式. ...

  3. JMS开发步骤和持久化/非持久化Topic消息

    ------------------------------------------------ 开发一个JMS的基本步骤如下: 1.创建一个JMS connection factory 2.通过co ...

  4. redisd的非持久化配置

    如何关闭redis持久化?我的需求是只把redis当作缓存来用,所以持久化到硬盘对我的需求来说没有意义. 修改redis配置文件,redis.conf 第115行左右. 1.注释掉原来的持久化规则 # ...

  5. 【配置】检测到在集成的托管管道模式下不适用的ASP.NET设置的解决方法(非简单设置为【经典】模式)。

      ×   检测到在集成的托管管道模式下不适用的ASP.NET设置的解决方法(非简单设置为[经典]模式). 我们将ASP.NET程序从IIS6移植到IIS7,可能运行提示以下错误: HTTP 错误 5 ...

  6. 安卓 logcat设置 Android logcat Settings

    安卓 logcat设置 Android logcat Settings 作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:313134555@qq.com E-mail: 3131 ...

  7. 【转】检测到在集成的托管管道模式下不适用的ASP.NET设置的解决方法(非简单设置为【经典】模式)。

    检测到在集成的托管管道模式下不适用的ASP.NET设置的解决方法(非简单设置为[经典]模式). 我们将ASP.NET程序从IIS6移植到IIS7,可能运行提示以下错误: HTTP 错误 500.23 ...

  8. RabbitMQ持久化和非持久化

    但是,非持久化要比持久化速度更快. 队列是否需要持久化:看需求

  9. echarts markLine 辅助线非直线设置

    效果图: 用例option: option = { title: { text: '未来一周气温变化', subtext: '纯属虚构' }, tooltip: { trigger: 'axis' } ...

随机推荐

  1. P1965 转圈游戏

    很容易可以得到,答案应该是(x+m*10^k)%n 很显然,用O(n)一定会卡爆,所以用快速幂来算,或者找一下循环节也是可以的. #include <bits/stdc++.h> usin ...

  2. android studio 出错

    http://blog.csdn.net/dhx20022889/article/details/44919905

  3. AndEngine

    AndEngine http://www.oschina.net/question/54100_16765

  4. java event

    What is an Event? Change in the state of an object is known as event i.e. event describes the change ...

  5. Android 的上下文菜单: Context Menu,registerForContextMenu(getListView())

    概述: Android 的上下文菜单类似于 PC 上的右键菜单.当为一个视图注册了上下文菜单之后,长按(2 秒左右)这个视图对象就会弹出一个浮动菜单,即上下文菜单.任何视图都可以注册上下文菜单,不过, ...

  6. .Net 2.0自带的Json序列化、反序列化方法

    public class JsonUtil    {        public static T DeserializeObject<T>(string json)        {   ...

  7. go安装windows源码

    直接安装就好,下面是安装地址http://pan.baidu.com/s/1gdDFi9t

  8. mysql慢查询

    查看当前服务器是否开启慢查询: 1.快速办法,运行sql语句show VARIABLES like "%slow%" 2.直接去my.conf中查看. my.conf中的配置(放在 ...

  9. node express 学习2

    上次我们的express已经安装好了 接下来我们修改渲染引擎为html // view engine setup app.set('views', path.join(__dirname, 'view ...

  10. -tableView: cellForRowAtIndexPath:方法不执行问题

    今天在学习UItableView 的时候,定义了一个属性 @property (weak, nonatomic) NSMutableArray *dataList: 在ViewDidLoad方法方法中 ...