Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
/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.
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
/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..
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.