Linux mint нужен ли swap

Linux Mint Forums

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

With or without swap

Post by reptilezone2002 » Sun Jun 19, 2016 8:41 am

  • hi
    I have 6Gb of ram i was thinking what if i go without a swap memory does this is a good idea. Does this effect the performance or will it creates system destabilize the system

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Re: With or without swap

Post by DeMus » Sun Jun 19, 2016 10:34 am

It depends on how much RAM you are using. When you get close to 6GB then you might get into trouble since all the RAM is being used.
Use system-monitor for some time to see how much RAM you normally use. If it is far away from 6GB then you don’t need swap.
You can also do this (Thanks to Pjotr):

That way you have swap should you need it, but the system prevents using it till it is absolutely necessary to use it making the OS as fast as possible by storing as much as possible in RAM first.

Re: With or without swap

Post by Cosmo. » Sun Jun 19, 2016 10:54 am

If you want to hibernate you do need swap definitely.

If not, you should anyway give a little bit room for swap, I recommend 2 GB (with hibernation 8 GB).
Most likely swap will not be used. But if you should run into a situation, where swapping gets needed and the system cannot swap (because there isN#t any), the system will stall and you have to reboot; in this case all unsaved data will be lost.

The price of 2 GB is low for securing you against this risk.

As long as swap does not get actually needed, there is no negative performance consequence.

kukamuumuka Level 16
Posts: 6705 Joined: Tue Sep 03, 2013 4:51 am Location: Finland Contact:

Читайте также:  Citrix gateway plugin linux

Re: With or without swap

Post by kukamuumuka » Sun Jun 19, 2016 10:58 am

Derek_S Level 6
Posts: 1279 Joined: Sat Dec 28, 2013 5:36 pm Location: Long Island, N.Y.

Re: With or without swap

Post by Derek_S » Sun Jun 19, 2016 5:36 pm

Hello reptilezone2002 — A few things I’d like to add:

1.) You’re using Linux here, not Windows. I’ve found that Windows tends to use swap constantly, regardless of how much memory you have installed or what you happen to be doing with the system. On the other hand, I’ve found that Linux uses swap only when it really needs to. Several members have already mentioned how to adjust the value for «swapiness» to the absolute minimum as well.

2.) The general rule of swap: The less physical memory your system has, the more you need swap, so the larger the swap partition should be. The more physical memory your system has, the less you need swap, so the swap partition can be made smaller. NOTE: Be aware that some of the advice you find on the web regarding swap size is very outdated. When someone recommends using 2x, 3x, or 4x the installed system memory as the recommended size for swap, it’s probably because their system has (or more correctly had) 256MB, 512MB, or 1GB of memory. In the last few years, even the systems considered to be «low-end» have moved well beyond that level.

3.) Even if your system has a more than a generous amount of memory installed, you should always have a swap partition. As Cosmo has already stated, if your system ever calls for even a few kilobytes of swap, and it’s not available because there’s no swap partition, the kernel will throw an «out of memory» error and crash. So you should always have a swap partition, even if it’s minimal in size.

In your specific case, consider following Cosmo’s advice: If you plan on never using hibernation, you’ll probably be fine with a 2GB swap partition. If you do plan on using hibernation, then make the swap partition 6GB in size.

«When you rise in the morning, give thanks for the light, for your life, for your strength. Give thanks for your food and for the joy of living. If you see no reason to give thanks, the fault lies in yourself.» — Tecumseh

Читайте также:  Линукс видеоредактор на русском

Re: With or without swap

Post by Laurent85 » Mon Jun 20, 2016 9:52 am

reptilezone2002 wrote: Does this effect the performance or will it creates system destabilize the system

Only Ram matters. The more Ram the more computer usage feels comfortable. Swap allows the computer to free some ram when low on ram for running processes.

Consider two computers, one with 4GB ram + 2 GB swap, the other one with 6GB and no swap. Do you think first one has the safest setup ?
No. Each totaling 6GB memory will both run out of memory if you concurrently load tons of applications, and computer #1 overall performances will dramatically deteriorate well ahead of computer #2 in such case.

See Mint system requirements:
512MB RAM (1GB recommended for a comfortable usage).

Basically If you used to run Mint on a computer with less than 6GB memory Ram+Swap and as your user profile never experienced memory shortages you can be confident you don’t need swap on your 6GB Ram computer, as most user profiles on ram usage don’t.

Источник

Раздел подкачки.

Нужен ли раздел подкачки в современных дистрибутивах Linux ? В частности Linux Mint. Или просто будет создаваться файл подкачки ?

От современности не зависит.

Или просто будет создаваться файл

Рекомендую просто купить больше ОЗУ 32-64ГБ будет ок.
16 самый минимум, запустить браузер.

По большому счёту от него только беды.

В сторону ZRAM лучше смотри.

Если озу 16+ то своп вообще не нужен.

Это несогласованный и бессмысленный набор утверждений.

Своп в принципе вредная технология в 2021 и он просто не нужен.
И то что управление памятью в линуксе на него полагается в некоторых случаях это беда.

И нет на 16 ГБ могут быть проблемы с нехваткой памяти и подвисанием системы (например при пухлом запросе в SQL на локальной базе или чём-нибудь подобном).
Но тут тоже особенности организации управления паматью и защиты процессов от выгрузки.

16 самый минимум, запустить браузер.

Запустить в космос? Может у вас просто системд с графикой 15GB кушает?

Вот зачем такой бред писать, вроде две звёзды даже?!

Ещё, без раздела/файла подкачки ты не сможешь уйти в режим гибернации. Остальное все индивидуально, зависит от требований и ресурсов.

Читайте также:  Listing all running services in linux

В отличии от тебя я пользуюсь ОС и компьютером в реальном мире, а не в иллюзорном-идеалистичном плане бытия.

И глупости регулярно постить планируете? Уже сто тем здесь было с доказательством работы фаерфокса и хромиума на лёгком DE учётом общей памяти в 1GB, и этого хватает на 5+ не тяжелых вкладок.

А вы говорите о минимуме для запуска браузерe — 16GB. Так и хочется написать: забанься, … Тоже звёзды новостями набивали?

Если озу 16+ то своп вообще не нужен

Сижу без свопа с середины нулевых. Сейчас 8гб озу.

Своп в принципе вредная технология в 2021 и он просто не нужен.

да, но тут 90% утверждают, что ядро не умеет полноценно работать без свопа

При крошечном количестве оперативки спасает своп в качестве дополнительного пространства для обработки процессов. А при хорошей озу это просто украшение.

Сижу без свопа с середины нулевых. Сейчас 8гб озу.

Ты проценты от балды написал или диванную аналитику проводил? 😀

Ну распарси учётку да узнаешь, ты ж головастый.

И глупости регулярно постить планируете? Уже сто тем здесь было с доказательством работы фаерфокса и хромиума на лёгком DE учётом общей памяти в 1GB, и этого хватает на 5+ не тяжелых вкладок.

Опять же, я живу в реальном мире и мне не впёрлась эта специальная олимпиада с запуском баткоинмайнера на stm32.

Не все готовы ждать когда из плана идеалов бодхисатва нам передаст идеальный софт работающий максимально быстро на 500000кб озу на старом пне.

Ты молодец чувак, борешься за справедливость, идеальный софт, радио радонеж и всё такое — а я лучше с комфортом буду работать уже сегодня с тем что есть.

Да, там есть какие стечения обстоятельст особенно в серверной среде когда всё тупо валится без свопа (ну и про гибернацию говорили уже, но это решается отдельным своп-файлом или неиспользованием гибернации).

Но фактически можно без свопа работать, сегодня он никакого выигрыша на десктопе не даёт. (а вот zram даёт)

Я хз, что у вас за суеверия по поводу свопа. Он работает гораздо лучше, чем в нулевых, он спасает в некоторых ситуациях, он не оказывает заметного влияния на производительность системы в целом.

И да, тотально не рекомендую zram, это просто источник малопредсказуемых тормозов.

izzholtik ★★★ ( 23.06.21 19:06:47 MSK )
Последнее исправление: izzholtik 23.06.21 19:07:38 MSK (всего исправлений: 1)

Источник

Оцените статью
Adblock
detector