norcal618
Posts: 2
Joined: Tue Apr 18, 2017 4:48 pm

Swap File Ubuntu Server/Owncloud

Tue Apr 18, 2017 4:55 pm

Hello, I have an Owncloud server running on Ubuntu Server 16.04 on a Raspberry Pi 3. I've had it up for a few days now and everything for the most part is working very well. I haven't set up any swap area on my server. I have an idea for a set up and I just wanted to get some feedback on whether or not this is a good idea.

So the OS and Owncloud backend is installed on the PI's 32 GB sd card. The owncloud data folder is on a separate usb HDD. I know it's not a good idea to put a swap file onto an sd card, so I want to put one on the same partition as the owncloud/data on the spinning hard disk. I was going to use the fallocate utility to set this up, but this returned an error because the HDD is a fat32 file system and fallocate does not support fat32. So another option, which I'm almost certain will create the swap file, is to run

Code: Select all

dd if=dev/zero of=/mnt/sda1/swap.file bs=1M count=3072
and then make that 3GB file into a swap file for the system. The Raspberry Pi 3 has 1GB of memory. I read somewhere else that Owncloud would like to have 3GB of swap to go along with this amount of memory.

I am hesitant to execute this operation because my instance of Owncloud is working "good enough" right now as is. There are times when navigating the web interface that it gets a little laggy though, and I thought maybe some swap could help remedy this.

Does this sound like an okay idea? Is putting the swap file on the same partition as the owncloud/data going to mess anything up? I know that dd can take awhile to do its job. Does anyone have any idea how long it will take to make my 3GB swap file?

Thanks

norcal618
Posts: 2
Joined: Tue Apr 18, 2017 4:48 pm

Re: Swap File Ubuntu Server/Owncloud

Thu Apr 20, 2017 2:59 am

No one?

Here's a tldr;
Ubuntu Server 16.04/Owncloud instance on Pi 3. Data is on spinning HDD. Currently have 0 swap. Should I add some swap to the system? If so, what would my best course of action be?

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Swap File Ubuntu Server/Owncloud

Fri Apr 21, 2017 9:57 am

norcal618 wrote:No one?

Here's a tldr;
Ubuntu Server 16.04/Owncloud instance on Pi 3. Data is on spinning HDD. Currently have 0 swap. Should I add some swap to the system? If so, what would my best course of action be?
What you need to realise is that forum member offer help and support voluntarily. In order to give useful information they need to understand the problem and the solution and maybe even have the same or similar set up. I guess no one else has a similar set up so unable to offer help. It may not need to be raspberry pi based system ,so other forums may be able to help. Coming out with your (now deleted) comments wont win you any friends, so I suggest patience or go elsewhare for assistance.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Return to “Networking and servers”