LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-20-2019, 04:53 AM   #1
bomberb17
Member
 
Registered: Jul 2005
Posts: 71

Rep: Reputation: 0
OpenVPN server on Ubuntu 18.04 and Odroid H3


Hello,
I'm running an openvpn server on Ubuntu 18.04 and ODROID H3 which has a 16GB SD card.
I want to minimize wear on the SD so I want to keep disk writes as low as possible.
Using iotop I found that openvpn makes freqent disk writes (for logging?)

Code:
 Total DISK READ :       0.00 B/s | Total DISK WRITE :       0.00 B/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:       0.00 B/s
  PID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
 1269 be/4 root          0.00 B     20.00 K  0.00 %  0.00 % [flush-179:0]
 1850 be/4 nobody        0.00 B    200.00 K  0.00 %  0.00 % openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf --writepid /run/openvpn/server.pid
Can someone tell what these writes are about and suggest how to minimize these disk writes?
Thank you
 
Old 08-20-2019, 05:19 PM   #2
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
OpenVPN is normally quiet. maybe you should have a look at those logs to see what is going on.
 
Old 08-20-2019, 07:58 PM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
/proc/PID/fdinfo contains information about each file descriptor, including the current position. To find out which file OpenVPN writes to, try checking which file descriptor's position changes most often. You could then either reconfigure OpenVPN so that it does not perform those writes, or move that file to a RAM-based /tmp or so.

I am sure that lsof is also a great tool for this, but I can't tell you the required command-line options.
 
Old 08-21-2019, 09:13 AM   #4
bomberb17
Member
 
Registered: Jul 2005
Posts: 71

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Skaperen View Post
OpenVPN is normally quiet. maybe you should have a look at those logs to see what is going on.
I checked /var/log/syslog and /var/log/syslog.1 , there are only a few logs regarding a couple of connections I did myself. These are not consistent with these persistent disk writes... (31M disk writes so far since yesterday)

Quote:
Originally Posted by berndbausch View Post
/proc/PID/fdinfo contains information about each file descriptor, including the current position. To find out which file OpenVPN writes to, try checking which file descriptor's position changes most often. You could then either reconfigure OpenVPN so that it does not perform those writes, or move that file to a RAM-based /tmp or so.

I am sure that lsof is also a great tool for this, but I can't tell you the required command-line options.
Ok but I'm not sure how to reconfigure openvpn to write to RAM or omit these writes entirely..
 
Old 08-21-2019, 10:30 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by bomberb17 View Post
Ok but I'm not sure how to reconfigure openvpn to write to RAM or omit these writes entirely..
Often, /tmp and other directories that contain data that need not be persistent are implemented as RAM filesystems, usually tmpfs. My Odroid has such a /tmp; I'd recommend it for SD-card-based servers.

You may be able to configure OpenVPN so that the file in question resides on a RAM filesystem.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Debian and Android on ODROID-C1/ODROID-C2 Vasant1234 Linux - Embedded & Single-board computer 0 05-09-2017 09:45 PM
pcDuino 3 Nano or Odroid-C1 for a Home Server? DonMegel Linux - Newbie 2 01-16-2015 12:25 PM
Directing OpenVPN client's traffic through the OpenVPN server mohtasham1983 Linux - Networking 1 01-17-2012 06:44 PM
OpenVPN client has not default gateway when connect to OpenVPN server sailershen Linux - Security 3 03-04-2010 02:20 AM
How does OpenVPN Linux server issues IP and netmask to OpenVPN clients on Windows XP pssompura Linux - Networking 0 12-24-2009 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration