Hi Fourdee,
A few times recently I get the 100% use swapfile warning message on the Cloudshell screen. I have 100 MB allocated. This persists until I reboot.
Is this anything to be concerned about? I assume so or else it wouldn't give a warning message?
Sometimes but maybe not every time this has happened has been when copying large files into ownCloud.
John
XU4 swapfile
Re: XU4 swapfile
Hi John,johnvick wrote:Hi Fourdee,
A few times recently I get the 100% use swapfile warning message on the Cloudshell screen. I have 100 MB allocated. This persists until I reboot.
Is this anything to be concerned about? I assume so or else it wouldn't give a warning message?
Sometimes but maybe not every time this has happened has been when copying large files into ownCloud.
John
The temp upload directory is
Code: Select all
/var/tmp/php_upload_tmp
Can you please give results for:
Code: Select all
df -h
cat /etc/sysctl.conf | grep swap
cat /etc/php5/apache2/php.ini | grep upload_tmp_dir
cat /etc/php5/cli/php.ini | grep upload_tmp_dir
cat /etc/php5/fpm/php.ini | grep upload_tmp_dir
cat /etc/php5/cgi/php.ini | grep upload_tmp_dir
Code: Select all
dietpi-config
#advanced options
#swapfile size
#try 1000
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: XU4 swapfile
Hi Fourdee,
I've installed php7 if that may be relevant?
John
Code: Select all
root@Odroid:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 110G 27G 78G 26% /
udev 10M 0 10M 0% /dev
tmpfs 399M 6.9M 392M 2% /run
tmpfs 996M 0 996M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 996M 0 996M 0% /sys/fs/cgroup
tmpfs 10M 1.3M 8.8M 13% /DietPi
tmpfs 996M 16K 996M 1% /tmp
/dev/mmcblk0p1 71M 25M 47M 35% /boot
/dev/sdb1 15G 4.9G 9.1G 35% /mnt/usb_1
tmpfs 200M 0 200M 0% /run/user/0
Code: Select all
root@Odroid:~# cat /etc/sysctl.conf | grep swap
vm.swappiness=1
Code: Select all
root@Odroid:~# cat /etc/php5/apache2/php.ini | grep upload_tmp_dir
cat: /etc/php5/apache2/php.ini: No such file or directory
Code: Select all
root@Odroid:~# cat /etc/php5/cli/php.ini | grep upload_tmp_dir
upload_tmp_dir = /var/tmp/php_upload_tmp
Code: Select all
root@Odroid:~# cat /etc/php5/fpm/php.ini | grep upload_tmp_dir
upload_tmp_dir = /var/tmp/php_upload_tmp
Code: Select all
root@Odroid:~# cat /etc/php5/cgi/php.ini | grep upload_tmp_dir
;upload_tmp_dir =
John
Re: XU4 swapfile
Edit /etc/apt/sources.list and when apt-get install php7.* ?johnvick wrote:I've installed php7 if that may be relevant?
Hmm, sorry, bad idea ....
As far as I know, php7.0 is still in beta and where is no application who need it coercively.
All dietpi-software, who need php, is optimise for php5 so far.
Re: XU4 swapfile
Yes it is a bit cutting edge but I'd done it earlier on BPi and was so impressed with the performance boost I tried it on the XU4 and found the same. Do you think this could be behind the swapfile problem?
Re: XU4 swapfile
Possibly.johnvick wrote:PHP7 Do you think this could be behind the swapfile problem?
If i remember correctly, PHP uses the /tmp folder for uploads by default. As this is mounted to RAM in DietPi, may be the cause of out of memory.
We change the upload directory for PHP5, to a disk location during installation:
Code: Select all
cat /etc/php5/cli/php.ini | grep upload_tmp_dir
upload_tmp_dir = /var/tmp/php_upload_tmp
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: XU4 swapfile
Hi Fourdee,
php7.0 uses the system default location for tmp files - I've changed the temp upload directory to the one you suggest - so will see if the the swapfile problem goes away.
John
php7.0 uses the system default location for tmp files - I've changed the temp upload directory to the one you suggest - so will see if the the swapfile problem goes away.
John
Re: XU4 swapfile
Hi John,johnvick wrote:Hi Fourdee,
php7.0 uses the system default location for tmp files - I've changed the temp upload directory to the one you suggest - so will see if the the swapfile problem goes away.
John
Excellent. Fingers crossed

If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: XU4 swapfile
All good now swapfile use has at most been 3%.
Thanks again for your help.
John
Thanks again for your help.
John
Re: XU4 swapfile
Hi John,johnvick wrote:All good now swapfile use has at most been 3%.
Thanks again for your help.
John
Excellent, good to hear all is well. Thanks for letting me know

I'll be taking a look at PHP7 when I start work on Debian Stretch, but wont be for a while, at least until we get more requests for it: https://github.com/Fourdee/DietPi/issues/475
Basically Stretch is the next Debian release, newer software versions (eg: PHP7) but its still in "testing", so could be buggy: https://wiki.debian.org/DebianStretch
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.