11da9 Problems with swap on ZFS ZVOL? - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > Installing & Upgrading

Installing & Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1  
Old December 6th, 2010, 04:35
nsayer's Avatar
nsayer nsayer is offline
Junior Member
 
Join Date: Dec 2008
Posts: 51
Thanks: 3
Thanked 4 Times in 2 Posts
Default Problems with swap on ZFS ZVOL?

I've recently set up a VPS at rootbsd. I set it up with GPT+ZFS almost the same way as my old physical machine (the difference is that I'm not using a mirror for the tank, since the underlying storage has redundancy, and the virtual disk is much smaller than the physical disk I had before): the only things on the disk are the freebsd-boot partition and the tank. Swap is provided on a zvol.

The system only has 768 MB of RAM, but this page has some tuning that suggests that it ought to work.

Under load, the system winds up using a couple dozen MB of swap, but then all of a sudden it locked up with repeated messages:

Code:
swap_pager: indefinite wait buffer: bufobj:
All I get from teh g00g on this is a thread from September of 2007 on freebsd-current.

Is there still problems swapping to a zvol? What can I do to make it more reliable?
Reply With Quote
  #2  
Old December 6th, 2010, 07:39
graudeejs's Avatar
graudeejs graudeejs is offline
Style(9) Addict
 
Join Date: Nov 2008
Location: Riga, Latvia
Posts: 4,525
Thanks: 422
Thanked 607 Times in 475 Posts
Default

You forgot to mention FreeBSD version....

I didn't have problems with swapping.... Once I made bug in a program, that filled ram and swapped 500MB in a about minute until I reset PC manually
Check this, maybe you're missing something related to swap itself:
http://wiki.bsdroot.lv/freebsd:quick...te_swap_on_zfs

Or maybe it's memory amount issue or old FreeBSD release
Reply With Quote
  #3  
Old December 6th, 2010, 18:01
nsayer's Avatar
nsayer nsayer is offline
Junior Member
 
Join Date: Dec 2008
Posts: 51
Thanks: 3
Thanked 4 Times in 2 Posts
Default

Sorry I forgot to mention it - 8.1-RELEASE.
Reply With Quote
  #4  
Old December 6th, 2010, 18:07
nsayer's Avatar
nsayer nsayer is offline
Junior Member
 
Join Date: Dec 2008
Posts: 51
Thanks: 3
Thanked 4 Times in 2 Posts
Default

I checked out the page you referenced. Turning checksums off is a good idea. I'll do that. I also read elsewhere that creating the zvol with a 4k block size was a good idea.

The example also creates a traditional swap partition. I didn't do that, and now it would be a day of work to repartition the drive. But if you're not usig that swap partition, then your results should still be valid.

But this is a very RAM constrained (virtual) machine. I wonder if that's the difference.
Reply With Quote
  #5  
Old December 7th, 2010, 09:36
danbi danbi is offline
Member
 
Join Date: Apr 2010
Location: Varna, Bulgaria
Posts: 227
Thanks: 1
Thanked 27 Times in 25 Posts
Default

Some people say enabling compression on the swap volume helps as well.
Reply With Quote
  #6  
Old December 7th, 2010, 21:02
nsayer's Avatar
nsayer nsayer is offline
Junior Member
 
Join Date: Dec 2008
Posts: 51
Thanks: 3
Thanked 4 Times in 2 Posts
Default

Quote:
Originally Posted by danbi View Post
Some people say enabling compression on the swap volume helps as well.
That's counter-intuitive. Do you have any references that explain why?
Reply With Quote
  #7  
Old December 7th, 2010, 21:07
graudeejs's Avatar
graudeejs graudeejs is offline
Style(9) Addict
 
Join Date: Nov 2008
Location: Riga, Latvia
Posts: 4,525
Thanks: 422
Thanked 607 Times in 475 Posts
Default

On one hand you need to read less data... on slow disks and fast cpu, this could be beneficial (perfect for floppy disks ).
On other hand you need to decompress data, which means, more cpu cycles, which means bigger latency.
Reply With Quote
  #8  
Old June 14th, 2011, 10:50
uchman uchman is offline
Junior Member
 
Join Date: Apr 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Was this issue resolved? I'm having the same problem.

Last edited by DutchDaemon; June 14th, 2011 at 13:23. Reason: It's "I'm".
Reply With Quote
  #9  
Old September 16th, 2012, 20:05
nsayer's Avatar
nsayer nsayer is offline
Junior Member
 
Join Date: Dec 2008
Posts: 51
Thanks: 3
Thanked 4 Times in 2 Posts
Default

No, this is still going on. I just caught my VPS stuck with this same problem.

The provider gave us all a RAM upgrade for free not too long ago. It's up to 1.3 GB of RAM, but that still isn't a lot for a ZFS equipped server.

I have a single zvol for swap, but things like building a JVM from the ports will easily wind up getting it stuck this way.
Reply With Quote
  #10  
Old September 16th, 2012, 23:26
gkontos's Avatar
gkontos gkontos is offline
Senior Member
 
Join Date: Dec 2009
Location: Polidendri, GR
Posts: 1,268
Thanks: 42
Thanked 218 Times in 164 Posts
Default

You are using ZFS on root on a very low memory system. (less significant in this case)
You are using ZFS on a virtualized vdev (more significant in this case)

Backup and reinstall using UFS or UFS+J.

If you want to implement a ZFS on root then get a dedicated server.
__________________
Powered by BareBSD
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Swap options for reliable ZFS system carlton_draught Installing & Upgrading 0 November 4th, 2010 05:48
[Solved] Major ZFS Problems the_sadman System Hardware 4 August 8th, 2010 21:18
Using a swap file and swap partition on same disk. atarahas General 4 April 22nd, 2010 20:51
SWAP File or SWAP Partition - VMWare VPS NuLL3rr0r General 9 March 27th, 2010 07:32
zvol swap and fstab wonslung General 9 June 19th, 2009 17:36


All times are GMT +1. The time now is 05:25.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0