В Linux стандартными средствами можно использовать часть оперативной памяти как диск. Для этого требуется указать тип монтирования tmpfs в команде mount
mount -t tmpfs -o size=5G tmpfs /mnt/ram
Теперь путь /mnt/ram можно использовать как обычный каталог. Для чего это может быть нужно?
▫️ Скорость работы с таким каталогом выше чем многие SSD и тем более HDD.
▫️ Если у вас очень быстрый SSD на NVMe M.2 то такой способ особо не прибавит вам скорости, но поможет сохранить ресурс SSD когда требуется обрабатывать очень много мелких файлов и оперативка позволяет выделить нужный объем.
▫️ Оперативка это энергозависимая память, поэтому выключении питания все файлы безвозвратно теряются. Такой "non persistent" каталог гарантирует удаление временных файлов.
Я написал небольшой скрипт для условного теста и сравнения скорости копирования файлов между SSD и RAM.
Вот мои результаты:
Single File Size: 30.0Gb
ssd > ssd: 0:00:12.850 / 2.3Gb/s
sdd > ram: 0:00:06.453 / 4.6Gb/s
ram > ram: 0:00:06.995 / 4.3Gb/s
ram > sdd: 0:00:06.217 / 4.8Gb/s
Dir size: 32.7Gb, File count: 11127
ssd > ssd: 0:00:15.063 / 2.2Gb/s
sdd > ram: 0:00:08.486 / 3.9Gb/s
ram > ram: 0:00:08.032 / 4.1Gb/s
ram > sdd: 0:00:07.026 / 4.7Gb/s
Скрипт для теста ↗️
На моём железе прирост скорости ~2x. Плюс экономия ресурса SSD.
В Windows такой фишки по умолчанию нет, но обязательно найдутся аналогичные решения
#linux#triks
#Back Stronger And Better.🦾
Getting Back On Track After An Unsuccessful Losing Streak
Did you lose a huge amount of money in Forex trading and want to desperately win your trading losses back? Don't worry! This has happened to many traders before and there are people who have got back on track. Losing a huge fortune may appear to be an indication of the end of your Forex trading career but it doesn't have to be. Treat your previous losing streak as the greatest lesson that you have had and start all over again. The only thing you need to make sure is not to repeat the same mistakes that you have committed before.
Forex trading is a career that requires a good discipline, patience, emotional stability and hard work. When you loose a huge money for the first time, you might have done the trading blunders that new traders often make. If you are aware of those mistakes and ensure not to do them again, then no one can stop you from succeeding in Forex. But always keep in mind that success doesn't come overnight. It takes years and you have to accept this reality.
Below are few guided steps to pull your string back;
• Take a break to ensure that your mind is free from any regrets or other negative emotions, this will make you slowly unburden yourself from the past and give you the necessary courage and confidence to start trading again.
• Review the mistakes you did the last time, including lack of proper training, poor risk management, and poor emotional management. Make a list of beginner's mistakes in Forex and clearly understand how those mistakes can ruin a trading account... Check most of our previous articles for better understanding on some beginners mistakes so you can be properly guided.
• Refresh your knowledge in Forex, do demo trading and back testing for a few days and start with the small account first. Make sure that the account size gives you enough room to take risks, as you must never risk more than 2% of your capital. Once you start winning some trades, you will get a strong confidence.
FxSignals_Gold Team.