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. 在Delphi下基于MapWinGIS添加和删除图层标注的方法

    unit Form_MainU; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, ...

  2. 六 mybatis高级映射(一对一,一对多,多对多)

    1  订单商品数据模型 以订单商品数据为模型,来对mybaits高级关系映射进行学习.

  3. 【转】Unity3D开发之Http协议网络通信

    之前unity3d项目要做跟服务器通信的模块,然后服务器那边的协议是基于http的Jsonrpc通信方式一开始,用C#的本身类HttpWebRequest来提交请求,很快就在电脑上面成功了,代码也很简 ...

  4. ROSE User Case View

    用例视图(User Case View) 在面向对象的分析过程中,此视图应该是需求分析的过程中采用,主要包括如下过程 01涉众分析--->02业务分析--->03概念分析--->04 ...

  5. volatile in thread

    public class TestCalc { public static void main(String[] args) { class StoppableThread extends Threa ...

  6. hibernate manytoone中的lazy EAGER

    Hibernate中的字段映射中的Fetch有两种方式:EAGER和LAZY Eager:全部抓取 Lazy:延迟抓取 如果在字段中声明为Eager,那么在取得当前Bean时,同时会抓取Bean中的关 ...

  7. pro8

    1.本次课学到的知识点 函数程序设计 结构化程序设计思想 程序解析 局部变量和全局变量 2.实验过程中遇到的问题及解决方法 实验过程中会遇到自定义函数的逻辑错误 与缺少定义变量 从主函数开始理清函数关 ...

  8. 日志案例分析(PV,UV),以及动态分区

    1.实现的流程 需求分析 时间:日,时段 分区表:两级 PV UV 数据清洗 2015-08-28 18:19:10 字段:id,url,guid,tracktime 数据分析 导出 2.新建源数据库 ...

  9. 导出证书Cer文件为Pem格式的步骤

    (1)先导出Push Services的证书,比如我们命名为“magic_cert.p12”,注意导出时会让你输入密码. (2)再导出Push Services证书的密钥(Private Key),比 ...

  10. Top 30 Nmap Command Examples For Sys/Network Admins

    Nmap is short for Network Mapper. It is an open source security tool for network exploration, securi ...