Solved FreeBSD running out of memory - MySQL

mark_j

Daemon

Reaction score: 870
Messages: 1,449

OP's config runs on ZFS. ZFS doesn't use swap, but IIRC, in a default ZFS setup, /tmp (zroot/tmp) is a separate dataset, as is /var/tmp.

Nor does UFS. I'm not sure of your point.
Regardless, this issue seems to have far too many gaps in the information provided by the OP to assist.
Cheers
 

astyle

Daemon

Reaction score: 990
Messages: 1,978

Nor does UFS. I'm not sure of your point.
Regardless, this issue seems to have far too many gaps in the information provided by the OP to assist.
Cheers
IIRC, UFS does use swap and you have to decide ahead of time how to organize partitions. I got tired of that, which prompted my move to ZFS. My point in this thread is, ZFS is your friend in surprising ways ( less likelihood of page thrashing when OP is using MySQL, for example).

Another thing to consider when providing assistance is to actually ask for missing information. Yeah, we can make educated guesses based on available info, but it shouldn't hurt to ask. 😩
 

grahamperrin

Beastie's Twin

Reaction score: 1,658
Messages: 5,017

I think it was meant colloquially, like, it's normal to find a swap partition after performing an installation that uses UFS instead of ZFS.

HTH
 

astyle

Daemon

Reaction score: 990
Messages: 1,978

What do you mean?
How?!
I think it was meant colloquially, like, it's normal to find a swap partition after performing an installation that uses UFS instead of ZFS.

HTH
The installer will definitely suggest a swap partition for a default disk layout if you pick UFS instead of ZFS. If you pay attention to the Handbook, particularly Section 2.6, Allocating Disk Space, Section 2.6.2, Guided Partitioning Using UFS, Figure 15 (Review Created Partitions) clearly shows a swap partition for the UFS option.
--
ZFS saves me the fuss. 😤
 

dbdemon

Member

Reaction score: 30
Messages: 60

The mysql import generally runs for ~10 days, so far it's running for 4 days.
That sounds like an extraordinarily long time, which suggests you have an extraordinarily large import. Am I right in thinking the import file is produced by a logical backup tool such as mysqldump? I don't know much about your use case, but if so, have you considered using a physical backup tool e.g. Percona's xtrabackup / innobackupex? These backups would be smaller and faster to both produce and to restore.
 
OP
Sparkee

Sparkee

Member

Reaction score: 13
Messages: 46

That sounds like an extraordinarily long time, which suggests you have an extraordinarily large import. Am I right in thinking the import file is produced by a logical backup tool such as mysqldump? I don't know much about your use case, but if so, have you considered using a physical backup tool e.g. Percona's xtrabackup / innobackupex? These backups would be smaller and faster to both produce and to restore.
I'm not the one who did the backup/restore though xtrabackup is often used. Import file was quite large, 750GB
 

Andriy

Active Member
Developer

Reaction score: 110
Messages: 109

The installer will definitely suggest a swap partition for a default disk layout if you pick UFS instead of ZFS.
Ah, that's what you meant.
There is a huge different between "UFS uses swap" and "installer creates swap partition".
AFAIR, the installer suggests to create a swap partition in the ZFS case as well.
 

astyle

Daemon

Reaction score: 990
Messages: 1,978

AFAIR, the installer suggests to create a swap partition in the ZFS case as well.
Funny... in ZFS setups that are supposedly 'default', as in suggested by the installer, I haven't seen a single swap section. Not on mine, not on anyone else's. To see who provided examples, take a look at this thread:
 

grahamperrin

Beastie's Twin

Reaction score: 1,658
Messages: 5,017

… in ZFS setups that are supposedly 'default', as in suggested by the installer, I haven't seen a single swap section. …

Discarded a few hours ago (sorry), I performed a guided installation in a virtual machine. Result: by default, a ~2 G swap partition.
 

dbdemon

Member

Reaction score: 30
Messages: 60

I'm not the one who did the backup/restore though xtrabackup is often used. Import file was quite large, 750GB
OK, that's great. Just thought I should also mention mydumper - specifically the accompanying myloader program - as an alternative for restoring logical backups as it utilises multithreading which might speed things up a bit for you.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,963
Messages: 40,708

(Yes, the [port][/port] bbcodes require category/portname to be translated correctly)
 
Top