简体   繁体   English

什么相当于 OracleDB 中 Postgres 的 fsync 设置?

[英]What's the equivalent to Postgres's fsync setting in OracleDB?

I have an OracleDB database running in a CI pipeline.我有一个在 CI 管道中运行的 OracleDB 数据库。 It gets setup and torn-down on each test run;它在每次测试运行时进行设置和拆除; and it's bloody slow.而且速度非常慢。

Since I don't care about integrity, is it possible to run OracleDB with no flushing to disk?由于我不关心完整性,是否可以在不刷新磁盘的情况下运行 OracleDB? Much like Postgres's fsync setting?很像 Postgres 的 fsync 设置?

I believe that the COMMIT_WAIT Oracle parameter is similar to PostgreSQL's fsync setting.我相信COMMIT_WAIT Oracle 参数类似于 PostgreSQL 的 fsync 设置。 After running the below command, Oracle will not wait for commits to be flushed to disk:运行以下命令后,Oracle 不会等待提交刷新到磁盘:

alter system set commit_wait = nowait;

But in my limited experience with that parameter, it does not significantly improve performance unless your system is doing a ridiculous number of commits.但是根据我对该参数的有限经验,除非您的系统执行大量可笑的提交,否则它不会显着提高性能。 Perhaps you should also look into using NOARCHIVELOG mode.也许您还应该考虑使用 NOARCHIVELOG 模式。 Oracle will still write transaction data to disks, but it will at least stop making an extra copy: Oracle 仍会将事务数据写入磁盘,但它至少会停止制作额外的副本:

SQL> shutdown  immediate;
SQL> startup mount
SQL> alter database noarchivelog;
SQL> alter database open;

But even those settings probably won't significantly improve administrative task times.但即使是这些设置也可能不会显着改善管理任务时间。 Oracle instances will never be small, lightweight processes. Oracle 实例永远不会是小型轻量级进程。 The closest thing is the multi-tenant option, which enables rapidly creating pluggable databases.最接近的是多租户选项,它可以快速创建可插拔数据库。 But that option requires setting up a central container database, which is probably what you're trying to avoid in the first place.但是该选项需要设置一个中央容器数据库,这可能是您首先要避免的。

Can you provide more information about your CI pipeline?您能否提供有关您的 CI 管道的更多信息? There might be some optimizations specific to your environment.可能有一些特定于您的环境的优化。 For example, I think that Oracle has some code to support Docker (although I'm not familiar with those options).例如,我认为 Oracle 有一些代码来支持 Docker (虽然我不熟悉这些选项)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM