Objectives and requirements for testing "1C Accounting"
The main goal of the testing is to compare the behavior of the 1C system on two different DBMS, all other conditions being the same. Those. The configuration of the 1C database and the initial data filling should be the same for each test.
The main parameters that must be obtained when testing:
- Time to complete each test (removed by 1C Development Department)
- The load on the DBMS and the server environment during the test is removed by the DBMS administrators, as well as by the system administrators in the server environment
Testing of the 1C system should be performed taking into account the client-server architecture, therefore it is necessary to produce a full-fledged emulation of the user or several users in the system with the development of input information in the interface and storing this information in the database. At the same time, it is necessary that a large amount of periodic information be distributed over a large period of time to create totals in accumulation registers.
')
To perform the testing, an algorithm was developed in the form of a scenario testing script for the 1C Accounting 3.0 configuration, in which sequential input of test data to the 1C system is performed. The script allows you to specify various settings for the actions performed and the amount of test data. Detailed description below.
Description of the settings and characteristics of the tested media
At Fortis, we decided to double-check the results, including using the well-known
Gilev test .
Also, we were encouraged to test, including some publications on the results of performance changes during the transition from MS SQL Server to PostgreSQL. Such as:
1C Battle: PostgreSQL 9.10 vs MS SQL 2016 .
So, here is the infrastructure for testing:
Servers for MS SQL and PostgreSQL were virtual and started alternately for the required test. 1C stood on a separate server.
DetailsHypervisor Specification:Model: Supermicro SYS-6028R-TRT
CPU: Intel® Xeon® CPU E5-2630 v3 @ 2.40GHz (2 sockes * 16 CPU HT = 32CPU)
RAM: 212 GB
OS: VMWare ESXi 6.5
PowerProfile: Performance
Hypervisor Disk Subsystem:Controller: Adaptec 6805, Cache size: 512MB
Volume: RAID 10, 5.7 TB
Stripe-size: 1024 KB
Write-cache: on
Read-cache: off
Wheels: 6 pcs. HGST HUS726T6TAL,
Sector-Size: 512 Bytes
Write Cache: on
PostgreSQL has been configured as follows:- postgresql.conf:
The basic setting was made on the calculator - pgconfigurator.cybertec.at , the parameters huge_pages, checkpoint_timeout, max_wal_size, min_wal_size, random_page_cost were changed based on information obtained from the sources mentioned at the end of the publication. The temp_buffers parameter value increased, based on the suggestion that 1C actively uses temporary tables:
listen_addresses = '*' max_connections = 1000
- Kernel OS settings:
Settings are specified in the profile file format for the tuned daemon:
[sysctl]
- File system:
The entire contents of the postgresql.conf file:
MS SQL was configured as follows:
and

Cluster 1C settings were left standard:

and

The servers did not have an antivirus program and nothing else was installed.
For MS SQL, the tempdb database was moved to a separate logical disk. However, the data files and transaction log files for the databases were located on the same logical drive (that is, no separation of the data files and transaction logs into separate logical drives was done).
Disk indexing in Windows, where MS SQL Server was located, was disabled on all logical drives (as is commonly done in most cases on prodovskikh environments).
Description of the basic algorithm of the automated testing scriptThe main estimated testing period is 1 year, during which documents and background information are generated for each day using the specified parameters.
For each day of execution, the input and output information blocks are started:
- Block 1 "SPR_PTU" - "The receipt of goods and services"
- The "Counterparts" directory opens.
- A new element of the "Counterparts" directory is created with the "Supplier" type
- A new element of the “Contracts” directory is created with the “Supplier” type for a new counterparty
- The “Nomenclature” directory opens.
- A set of elements of the “Nomenclature” directory is created with the “Product” type.
- A set of elements of the “Nomenclature” directory is created with the “Service” view.
- A list of documents "Income of goods and services"
- A new document “Receipt of goods and services” is created in which the tabular parts “Goods” and “Services” are filled with the created data sets
- The report "Account Card 41" for the current month is formed (if the interval of additional formation is indicated)
- Block 2 "SPR_RTU" - "Sales of goods and services"
- The "Counterparts" directory opens.
- A new element of the "Counterparts" directory is created with the "Buyer" view.
- A new element of the “Contracts” directory is created with the view “With the buyer” for a new counterparty
- A list of documents "Sales of goods and services"
- A new document “Sales of goods and services” is being created in which the tabular parts “Goods” and “Services” are filled in according to the specified parameters from previously created data
- The report "Account Card 41" for the current month is formed (if the interval of additional formation is indicated)
- The report “Account Card 41” for the current month is formed.
At the end of each month, in which the creation of documents was performed, the input and output information blocks are executed:
- The report “Account Card 41” is formed from the beginning of the year at the end of the month.
- Formed report "turnover balance sheet" from the beginning of the year at the end of the month
- Regular procedure “Closing of the month” is carried out.
As a result of the test, information about the test time is given in hours, minutes, seconds and milliseconds.
Key features of the test script:- The ability to disable / enable individual blocks
- Ability to specify the total number of documents for each of the blocks
- Ability to specify the number of documents for each of the blocks per day
- The ability to specify the number of goods and services within the documents
- Ability to set lists of quantitative and price indicators for the record. Used to create different sets of values ​​in documents.
Basic test plan for each database:- "First Test". A small number of documents with simple tables are created under one user, “closing months” are formed
- — 20 . 1 . : 50 «», 50 «», 100 «», 50 «» + «», 50 «» + «», 2 « ». 1 1
- « ». ,
- — 50-60 . 3 . : 90 «», 90 «», 540 «», 90 «» + «», 90 «» + «», 3 « ». 3 3
- « ». . .
- — 40-60 . 2 . : 50 «», 50 «», 300 «», 50 «» + «», 50 «» + «». 3 3
:- , :
- « » « »
- 1 "*.dt"
- « »
results
And now the most interesting is the results on MS SQL Server DBMS:Details:

:

:

PostgreSQL,
, , , :
:

:

:

Gilev test:As can be seen from the results, in the general synthetic benchmark, the PostgreSQL DBMS lost an average of 14.82% in performance to the MS SQL DBMS . However, according to the last two indicators, PostgreSQL showed a much better result than MS SQL.Specialized tests for 1C Accounting:As can be seen from the results, 1C Accounting works approximately equally on both MS SQL and PostgreSQL with the above settings.In both cases, the DBMS worked stably.Of course, you may need more fine tuning from both the DBMS and the OS side and the file system. Everything was done the way the publications were broadcast, which said that there would be a significant performance increase or approximately the same when switching from MS SQL to PostgreSQL. Moreover, in this testing a number of measures were taken to optimize the OS itself and the file system for CentOS, which are described above.It is worth noting that the Gilev test was run repeatedly for PostgreSQL — the best results are given. According to MS SQL, the Gilev test was launched 3 times, that is, they were not further optimized for MS SQL. All subsequent attempts were to bring the elephant to MS SQL.After achieving the optimal difference in the Gilev synthetic test between MS SQL and PostgreSQL, specialized tests were conducted for 1C Accounting, as described above.The general conclusion is that, despite a significant drawdown in performance on the Gilev synthetic test, PostgreSQL DBMS relative to MS SQL, with proper settings given above, 1C Accounting can be installed on both MS SQL DBMS and PostgreSQL DBMS .Remarks
Immediately it should be noted that this analysis was done only to compare the performance of 1C in different DBMS.This analysis and conclusion is correct only for 1C Accounting under the conditions and software versions described above. Based on the analysis obtained, it is impossible to conclude exactly what will happen with other settings and software versions, as well as with a different 1C configuration.However, the result of the Gilev test suggests that in all configurations of 1C version 8.3 and newer with proper settings, the maximum performance drawdown is likely to be no more than 15% for PostgreSQL DBMS relative to MS SQL DBMS. It is also worth considering that any detailed testing for accurate comparison takes considerable time and resources. Based on this, it is possible to make a more likely assumption that1C version 8.3 and newer can be transferred from MS SQL to PostgreSQL with a maximum performance loss of up to 15%. Objective barriers to the transition were not identified, t to these 15% may not appear, and in the event of their manifestation, it is enough just to buy a little more powerful equipment if necessary.It is also important to note that the tested databases were small, that is, significantly less than 100 GB of data size, and the maximum number of simultaneously running threads was 4. This means that for large databases that are significantly larger than 100 GB (for example, about 1 TB) , as well as for databases with intensive calls (tens and hundreds of simultaneous active threads), these results may be incorrect.For a more objective analysis, it will be useful in the future to compare the released MS SQL Server 2019 Developer and PostgreSQL 12 installed on the same CentOS OS, and also when MS SQL is on the latest version of the Windows Server OS. Now, no one puts PostgreSQL on Windows OS, and the PostgreSQL DBMS performance will be very significant.Of course, the Gilev test speaks in general about performance and not only for 1C. However, at the moment it is time to say that MS SQL DBMS will always be much better than PostgreSQL DBMS early, because there are not enough facts. To confirm or refute this statement, you must do a number of other tests. For example, for .NET you need to write both atomic actions and complex tests, run them repeatedly and under different conditions, fix the execution time and take the average value. After that, compare these values. This will be an objective analysis.At the moment we are not ready to conduct such an analysis, but in the future it is quite possible that we will conduct it. Then we will write in more detail at what operations PostgreSQL is better than MS SQL and how much in percents, and where MS SQL is better than PostgreSQL and how many in percents.Also, in our test, optimization methods for MS SQL, which are described here, were not applied . Perhaps in this article just forgot to turn off the indexing of Windows disks.When comparing two DBMS, one more weighty moment must be remembered: PostgreSQL DBMS is free and open, while MS SQL DBMS is paid and has a closed source code.Acknowledgments
- set up 1C and run the Gilev tests, and also made a significant contribution to the creation of this publication:
- Roman Buts - team leader 1C
- Alexander Gryaznov - 1C programmer
- Fortis colleagues who have made significant contributions to optimizing CentOS, PostgreSQL, and more, but have chosen to remain incognito
Also a special thank you to uaggster and BP1988 for consultation in some points on MS SQL and Windows.Afterword
Also an interesting analysis was done in this article .What were your results and how did you do the testing?Sources