Performance of TRIM command on ext4 filesystem

PostMark test

Parametres of the Postmark test
set number 50000
set transactions 50000
set read 4096
set write 4096
set bias read 5
set bias create 5
set report terse
set size 1000 200000
set buffering true|false
I have run this particular test on ext4 filesystem with -o nodiscard and -o discard mount options 10x with each mount option, then I have computed average values and percentage differences between nodiscard and discard option.

Testing order

1. mkfs.ext4
2. mount -o (nodiscard|discard)
3. ./postmark
4. umount
5. repeat 1. - 4. ten times 

vendor2 device

                                   |   	      BUFFERING ENABLED*        |       BUFFERING DISABLED*          |
--------------------------------------------------------------------------------------------------------------
Type				   |NODISCARD    DISCARD      DIFF      |NODISCARD    DISCARD      DIFF      |
==============================================================================================================
Total_duration                     |377.80       598.80       58.50%    |370.20       594.60       60.62%    |
Duration_of_transactions           |297.20       521.60       75.50%    |285.10       515.90       80.95%    |
Transactions/s                     |168.30       95.86        -43.04%   |175.51       96.93        -44.77%   |
Files_created/s                    |197.92       124.86       -36.91%   |201.98       125.75       -37.74%   |
Creation_alone/s                   |773.10       785.16       1.56%     |772.00       784.03       1.56%     |
Creation_mixed_with_transaction/s  |83.34        47.47        -43.04%   |86.92        48.00        -44.78%   |
Read/s                             |84.06        47.88        -43.04%   |87.67        48.41        -44.78%   |
Append/s                           |84.23        47.98        -43.04%   |87.85        48.51        -44.78%   |
Deleted/s                          |197.92       124.86       -36.91%   |201.98       125.75       -37.74%   |
Deletion_alone/s                   |765.71       777.65       1.56%     |764.62       776.53       1.56%     |
Deletion_mixed_with_transaction/s  |84.95        48.39        -43.04%   |88.59        48.93        -44.77%   |
Read_B/s                           |7288249.95   4597787.15   -36.92%   |7437901.50   4630656.70   -37.74%   |
Write_B/s                          |22807978.80  14388396.10  -36.92%   |23276301.20  14491259.30  -37.74%   |
==============================================================================================================


vendor1 device

                                   |   	      BUFFERING ENABLED*        |       BUFFERING DISABLED*          |
--------------------------------------------------------------------------------------------------------------
Type				   |NODISCARD    DISCARD      DIFF      |NODISCARD    DISCARD      DIFF      |
==============================================================================================================
Total_duration                     |182.40       212.10       16.28%    |180.30       209.10       15.97%    |
Duration_of_transactions           |120.40       148.80       23.59%    |117.60       146.70       24.74%    |
Transactions/s                     |415.30       336.06       -19.08%   |425.20       340.84       -19.84%   |
Files_created/s                    |409.95       352.54       -14.00%   |414.73       357.56       -13.78%   |
Creation_alone/s                   |970.40       963.67       -0.69%    |954.59       966.58       1.26%     |
Creation_mixed_with_transaction/s  |205.67       166.42       -19.08%   |210.57       168.79       -19.84%   |
Read/s                             |207.44       167.85       -19.09%   |212.38       170.24       -19.84%   |
Append/s                           |207.86       168.19       -19.08%   |212.81       170.59       -19.84%   |
Deleted/s                          |409.95       352.54       -14.00%   |414.73       357.56       -13.78%   |
Deletion_alone/s                   |961.13       954.45       -0.70%    |945.46       957.33       1.26%     |
Deletion_mixed_with_transaction/s  |209.63       169.63       -19.08%   |214.63       172.05       -19.84%   |
Read_B/s                           |15096194.90  12981826.50  -14.01%   |15272242.70  13166944.50  -13.79%   |
Write_B/s                          |47242300.80  40625558.00  -14.01%   |47793228.00  41204869.60  -13.79%   |
==============================================================================================================


vendor3

                                   |   	      BUFFERING ENABLED*        |       BUFFERING DISABLED*          |
--------------------------------------------------------------------------------------------------------------
Type				   |NODISCARD    DISCARD      DIFF      |NODISCARD    DISCARD      DIFF      |
==============================================================================================================
Total_duration                     |220.20       2628.50      1093.69%  |218.40       2651.60      1114.10%  |
Duration_of_transactions           |157.90       2479.90      1470.55%  |155.80       2493.50      1500.45%  |
Transactions/s                     |316.68       20.16        -93.63%   |320.93       20.06        -93.75%   |
Files_created/s                    |339.52       28.45        -91.62%   |342.32       28.20        -91.76%   |
Creation_alone/s                   |969.86       981.15       1.16%     |971.11       971.11       -0.00%    |
Creation_mixed_with_transaction/s  |156.83       9.99         -93.63%   |158.93       9.93         -93.75%   |
Read/s                             |158.17       10.07        -93.63%   |160.30       10.02        -93.75%   |
Append/s                           |158.50       10.09        -93.63%   |160.63       10.04        -93.75%   |
Deleted/s                          |339.52       28.45        -91.62%   |342.32       28.20        -91.76%   |
Deletion_alone/s                   |960.59       971.77       1.16%     |961.83       961.83       -0.00%    |
Deletion_mixed_with_transaction/s  |159.86       10.18        -93.63%   |162.00       10.12        -93.75%   |
Read_B/s                           |12502731.80  1047732.08   -91.62%   |12605752.30  1038640.13   -91.76%   |
Write_B/s                          |39126271.20  3278791.40   -91.62%   |39448664.80  3250338.88   -91.76%   |
==============================================================================================================


* - Buffering means that C library function like fopen, fread, fwrite are used instead of open, read, write. I have used the word buffering in the same way as it is used in the postmark test