$arSelect = Array("ID", "IBLOCK_ID", "NAME", "PROPERTY_FILE");//IBLOCK_ID и ID обязательно должны быть указаны,
$lstScetionsIDs = array(3768, 3769, 3770, 3771, 3772, 3773, 3774, 3775, 3776); //разделы
$arFilter_old = Array(
"IBLOCK_ID"=>390, // id инфоблока
'ACTIVE' => 'Y', // фильтруем по активности
);
$arOrder = Array('ID' => 'ASC');
foreach ($lstScetionsIDs as $SECTION_ID) {
$arFilter_old['SECTION_ID'] = $SECTION_ID;
$res = CIBlockElement::GetList($arOrder, $arFilter_old, false, Array("nTopCount"=>1), $arSelect);
$arElement = $res->GetNext();
echo '<a href="'.CFile::GetPath($arElement["PROPERTY_FILE_VALUE"]).'">'.$arElement["NAME"].'</a><br>';
}
Все остальное на твоей совести, помни только что каждый созданный класс усложняет понимание твоих намерений для других программистов
Этот тест показывает не столько работу диска, сколько работу php с файлами: создается, исполняется, удаляется большое число простых файлов. Данный показатель зависит от производительности файловой системы и эффективности работы php акселератора. В целом хорошо показывает, как работает php на данной конфигурации (без учета работы базы).
dd if=/dev/urandom of=/random_file bs=8G count=1 iflag=fullblock
# fio -ioengine=libaio -fsync=1 -direct=1 -name=test -bs=4k -iodepth=1 -rw=write -runtime=60 -filename=/random_file
test: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.7
Starting 1 process
Jobs: 1 (f=1): [W(1)][100.0%][r=0KiB/s,w=226MiB/s][r=0,w=57.9k IOPS][eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=55915: Mon Jul 19 01:39:33 2021
write: IOPS=49.4k, BW=193MiB/s (202MB/s)(8192MiB/42472msec)
slat (usec): min=2, max=10811, avg= 3.88, stdev= 9.37
clat (nsec): min=419, max=3429.5k, avg=10629.53, stdev=8385.86
lat (usec): min=9, max=10861, avg=14.61, stdev=12.76
clat percentiles (nsec):
| 1.00th=[ 7968], 5.00th=[ 8096], 10.00th=[ 8256], 20.00th=[ 8512],
| 30.00th=[ 8640], 40.00th=[ 8640], 50.00th=[ 9024], 60.00th=[ 9536],
| 70.00th=[ 9792], 80.00th=[10304], 90.00th=[12224], 95.00th=[15936],
| 99.00th=[43776], 99.50th=[48896], 99.90th=[64256], 99.95th=[80384],
| 99.99th=[96768]
bw ( KiB/s): min=120344, max=236144, per=100.00%, avg=201888.17, stdev=27028.64, samples=82
iops : min=30086, max=59036, avg=50472.01, stdev=6757.15, samples=82
lat (nsec) : 500=0.01%, 750=0.01%, 1000=0.01%
lat (usec) : 2=0.01%, 4=0.01%, 10=75.35%, 20=21.14%, 50=3.09%
lat (usec) : 100=0.39%, 250=0.01%, 500=0.01%, 750=0.01%
lat (msec) : 2=0.01%, 4=0.01%
fsync/fdatasync/sync_file_range:
sync (nsec): min=23, max=19393, avg=61.01, stdev=60.31
sync percentiles (nsec):
| 1.00th=[ 40], 5.00th=[ 42], 10.00th=[ 43], 20.00th=[ 46],
| 30.00th=[ 48], 40.00th=[ 50], 50.00th=[ 52], 60.00th=[ 58],
| 70.00th=[ 62], 80.00th=[ 66], 90.00th=[ 83], 95.00th=[ 109],
| 99.00th=[ 161], 99.50th=[ 199], 99.90th=[ 402], 99.95th=[ 652],
| 99.99th=[ 884]
cpu : usr=14.62%, sys=31.89%, ctx=4194226, majf=0, minf=34
IO depths : 1=200.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=0,2097152,0,2097151 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
WRITE: bw=193MiB/s (202MB/s), 193MiB/s-193MiB/s (202MB/s-202MB/s), io=8192MiB (8590MB), run=42472-42472msec
Disk stats (read/write):
md126: ios=18/4269683, merge=0/0, ticks=0/0, in_queue=3416331696, util=100.00%, aggrios=9/2181156, aggrmerge=0/41866, aggrticks=1/17316, aggrin_queue=17318, aggrutil=97.13%
nvme0n1: ios=17/2181156, merge=0/41866, ticks=3/17507, in_queue=17510, util=97.13%
nvme1n1: ios=1/2181156, merge=0/41866, ticks=0/17126, in_queue=17126, util=97.11%
# fio -ioengine=libaio -fsync=1 -direct=1 -name=test -bs=4k -iodepth=1 -rw=write -runtime=60 -filename=/dev/md126
test: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=1
fio-3.7
fio: /dev/md126 appears mounted, and 'allow_mounted_write' isn't set. Aborting.
Run status group 0 (all jobs):
Файл стандартный от битрикса: