ZFS использование кеша (arc)

123
Andreyka
На сайте с 19.02.2005
Offline
822
#11

zfs - кака?

Не стоит плодить сущности без необходимости
Boris A Dolgov
На сайте с 04.07.2007
Offline
215
#12

Не кормим, не кормим :)

С уважением, Борис Долгов. Администрирование, дешевые лицензии ISPsystem, Parallels, cPanel, DirectAdmin, скины, SSL - ISPlicense.ru (http://www.isplicense.ru/?from=4926)
Mage1
На сайте с 05.07.2007
Offline
83
#13
Andreyka:
zfs - кака?

Storage pool Version: 14 (spa)

vlad11
На сайте с 11.01.2011
Offline
73
#14
Mage1:
Storage pool Version: 14 (spa)

не кормим троля

Администрирование Linux и FreeBSD. Настройка BGP. (/ru/forum/744772)
rtyug
На сайте с 13.05.2009
Offline
263
#15
Andreyka:
zfs - кака?

у ТС файлов очень много, даже очень много и их надо все сразу отдать одним куском, как я понял...

тут большая нарузка будет на ядро и на fs, (точно не знаю как тут сказать, все будет на IO винчестера)

РСУБД будет эмулировать носитель инфрмации, так же можно сетевой носитель информации (с репликацией)

тут вообще-то долго все перечислять, можно многое написать :)

http://www.khmere.com/freebsd_book/html/ch06.html

6.1 Advanced I/O and Process Resources

As we have seen from the previous chapter, programs can have multiple file descriptors open at the same time. These file descriptors aren't necessarily files, but can be fifos, pipes, or sockets. As such, the ability to multiplex these open descriptors becomes important. For example, consider a simple mail reader program, like pine. It should of course allow the user to not only read and write email, but also simultaneously check for new email. That means the program receives input from at least two sources at any given point: one source is the user, the other is the descriptor checking for new mail. Handling multiplexing descriptors is a complex issue. One method is to mark all open descriptors non-blocking (O_NONBLOCK), and then loop through them until one is found that will allow an I/O operation. The problem with this approach is that the program constantly loops, and if no I/O is available for a long time, the process will tie up the CPU. Your CPU load only worsens when multiple processes are looping on a small set of descriptors.

Another approach is to set signal handlers to catch when I/O is available, and then put the process to sleep. This sounds good in theory, if you only have a few open descriptors and infrequent I/O requests. Because the process is sleeping, it will not tie up the CPU, and it will then only execute when I/O is available. However, the problem with this approach is that signal handling is somewhat expensive. For example a web server receiving 100 requests per minute, would need to catch signals almost constantly. The overhead from catching hundreds of signals per minute would be significant, not only for the process but for the kernel to send these signals as well.

So far, both options are limited and ineffective, with the common problem being that a process needs to know when I/O is available. However, this information is actually only known in advance by the kernel, because the kernel ultimately handles all the open descriptors on the system. For example, when a process sends data over a fifo to another, the sending process calls write, which is a system call and thus involves the kernel. The receiver will not know until the write system call is executed by the sender. So, a better way to multiplex file descriptors suggests itself: have the kernel manage it for the process. In other words, send the kernel a list of open descriptors and then wait until the kernel has one or more ready, or until a time-out has expired.

This is the approach taken by the select(), poll() and kqueue() interfaces. Through these, the kernel will manage the descriptors and awake the process when I/O is available. These interfaces elegantly handle the problems mentioned above. The process doesn't need to loop through the open descriptors, nor does it need to handle signals. The process will still incur a slight overhead, however, when using these functions. This is because the I/O operations are executed after the return from these interfaces. Thus it takes at least two system calls to perform any operation. For example, say your program has two descriptors used for reading. You use select and wait for them to have data to read. This requires the process to first call select, and then when select returns, to call read on the descriptor. More ideally, you could do a large blocking read against all of the open descriptors. Once one is ready to read, the read will return with the data inside the buffer and an indication of which descriptor the data was read from.
6.4 kqueue

So far, poll and select seem like elegant ways to multiplex file descriptors. To use either of those two functions, however, you need to create the list of descriptors, then send them to kernel, and then upon return, look through the list again. That seems a bit inefficient. A better model would be to give the descriptor list to the kernel and then wait. Once one or more events happen, the kernel can notify the process with a list of only the file descriptors which had events, avoiding loops through the entire list every time a function returns. Although this small gain is not noticeable if the process only has a few descriptors open, for programs with thousands of open file descriptors, the performance gains are significant. This was one of the main goals behind the creation of kqueue. Also, the designers wanted a process to be able to detect a wider variety of events, such as file modification, file deletion, signals delivered, or a child process exit, with a flexible function call that subsumed other tasks. Handling signals, multiplexing file descriptors, and waiting for child processes can all be wrapped into this single kqueue interface because they are all waiting for an event to occur.
Спалил тему: Pokerstars вывод WMZ, etc на VISA 0% или SWIFT + Конверт USD/GBP,etc (net profit $0,5 млрд) (https://minfin.com.ua/blogs/94589307/115366/) Monobank - 50₴ на счет при рег. тут (https://clck.ru/DLX4r) | Номер SIP АТС Москва 7(495) - 0Ꝑ, 8(800) - 800Ꝑ/0Ꝑ (http://goo.gl/XOrCSn)
Andreyka
На сайте с 19.02.2005
Offline
822
#16

А с каких пор 220k файлов это стало много?

Если конечно не держать их в одной директории.

Или это просто много для zfs?

vlad11
На сайте с 11.01.2011
Offline
73
#17
rtyug:
у ТС файлов очень много, даже очень много и их надо все сразу отдать одним куском, как я понял...

тут большая нарузка будет на ядро и на fs, (точно не знаю как тут сказать, все будет на IO винчестера)
РСУБД будет эмулировать носитель инфрмации, так же можно сетевой носитель информации (с репликацией)
тут вообще-то долго все перечислять, можно многое написать :)

http://www.khmere.com/freebsd_book/html/ch06.html

Не вводите людей в заблуждение.

В работе видел пики до 10MBps, в синтетических тестах в пределах максимального i/o винтов.

rtyug
На сайте с 13.05.2009
Offline
263
#18
Andreyka:
А с каких пор 220k файлов это стало много?
Если конечно не держать их в одной директории.

Или это просто много для zfs?

нет, проблема может быть в том как именно открываются эти файлы (так как используется самописный скрипт)

по крайней мере можно так предположить...? :)

тоже, самое может быть, если 10-50к сокетов каждую секунду толкать не правильно (не оптимизированно) в многопоточность, то ОС может жрать память и отвалится... (и на сервере и на клиенте *{*$ на клиенте в случае инициализации})

Mage1
На сайте с 05.07.2007
Offline
83
#19
rtyug:
нет, проблема может быть в том как именно открываются эти файлы (так как используется самописный скрипт)
по крайней мере можно так предположить...? :)

php file_get_contents

Mage1
На сайте с 05.07.2007
Offline
83
#20

Решил попробовать обновиться до 8.2-RC2, но возникла следующая проблема. Хочу сделать бекап и скачать на другую машину перед обновлением. Ранее бекап делался в пятницу в 23 часа и к утру субботы был готов (в пятницу вечером и субботу наименьшая посещаемость). Сейчас количество (и объем) файлов увеличился и даже днем субботы процесс бекапа (bsdtar) в самом разгаре (судя по размеру архива - процентов 30-40 готово), при этом он занимает диск (LA 0.1-0.2), страницы отдаются всё медленнее и в определенное время в субботу совсем отказываются отдаваться :) Подскажите, как в таких условиях можно сделать бекап, не выключая веб-сервер?

UP: похоже, понижение приоритета командой renice сработало, сервер работает, бекап архивируется.

123

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий