Rubyw.exe drive writes

Is it normal for rubyw.exe to be constantly writing information to
disk?  At idle, every second rubyw.exe receives 64 bytes of data and
writes 20 kilobytes to disk.  What information needs to be written so
often?

Listening to a mechanical drive being continuously
accessed by this program is grating on my nerves.  It's just
never-ending drive writes; all day, every day.

Edit: I should note that after disconnecting from the VPN rubyw.exe still writes 3k+.
«1

Comments

  • Actually, poking around in the resource monitor, I see that rubyw.exe writes to pia_manager.log. Viewing that file, it does appear to be logging some latency related information, but what it typically writes is:

    [05/04/14 17:35:59] connection_status: CONNECTED
    [05/04/14 17:35:59] reset_bad_state

    And it logs that EVERY second. Is the "reset_bad_state" normal?

    Is there a way to prevent Ruby from logging this redundant information so often? Or turn off logging altogether? I can't imagine the PIA_manager needs to read a log file as any data it needs must surely be read from memory prior to it being written... right?
  • You could try write-protecting the file?
  • I see the same thing on my WHS V1 system.  Ruby kills my read/write performance on my home server because of this incessant disk activity.  I wish there was a way to either top this activity or have the option to reduce it. I understand the reason for Ruby, but that does not excuse how poorly it behaves in terms of constant disk access.  
  • It's not Ruby itself - PIA Manager is doing the logging. You can avoid this by using OpenVPN.
  • edited May 2014
    The pia_manager wouldn't do anything after write protecting the log file. It didn't give an error, but the VPN wouldn't connect and the tray icon did not load.

    Utilizing Sysinternals Process Monitor, I see rubyw.exe accesses:

    \pia_manager\nolog
    \pia_manager\data\command_file.txt
    \pia_manager\log\pia_manager.log
    \pia_manager\log\openvpn.pid

    All of the files appear in their respective directories except for "nolog". Apparently, Ruby tries to create this file, but returns a "name not found". Unable to create this file for some reason?

    The most activity seems to involve "openvpn.pid"; Ruby creates the file, followed by many "buffer overflow" responses. From what I have read, this means that the memory alloted is not large enough for the data that the process is attempting to manage. I have no idea if this is usual or if it affects performance.

    At any rate, I think I will look into OpenVPN. My drive is relatively quiet, but just knowing that it's constantly being accessed more than once a second is just too much for me to bear.
  • ... but just knowing that it's constantly being accessed more than once a second is just too much for me to bear.
    That would destroy an SSD relatively quickly.  Is it really writing that often?  People with SSD's that use the PIA client should be worried if that is true.
  • edited May 2014
    Yes, it really does acess that often. Do you use the program? You can see for yourself by using Process Monitor.

    I had been considering the effects on SSD, but I'm not sure if it's detrimental considering the small amount of data being written.
  • NAND memory is allocated in 4 kilobyte blocks. Every time you write any amount of data, you write 4K. And if you do this multiple times every second... Let us do some mathematics.
    There are twenty four hours in a day, each with 60 minutes, and each of those with 60 seconds. So that is 24 * 60 * 60 = 86,400 seconds in a day. If it wrote just one time per second, the minimum amount of writes is 86400 * 4096 bytes. That is 353,894,400 bytes, or 337.5 MB of writes every day. And in a year, that is over 120 terabytes of data written.

    Your SSD may be mostly full, in which case the same blocks may be written to an abnormal amount of times. And without a doubt, if you use TLC NAND the drive will start reporting bad sectors years faster than it would otherwise.
  • Yes, it really does acess that often. Do you use the program? You can see for yourself by using Process Monitor.
    Actually I don't use it anymore, I started using the openVPN client.  I uninstalled the PIA client a few weeks back when PIA refused to release a change log.

    Is this an anomaly with the latest release or has this always been there?
  • I do not like hearing my mechanical drive "ticking", and I don't like thinking my SSD is being worn even without hearing any noise. But my contention lies with the drive accessing--aside from any wear.

    I am not a knowledgable user when it comes to Windows processes so I cannot tell whether this activity is normal or not. However, if something accesses a drive more than once a second, then that seems like abnormal activity.

    I don't know if this is something recent as I only began using PIA a few months ago and more recently noticed this activity a few weeks ago when I installed Windows on a mechanical drive.

  • The client never did any of this to me, but this is not the first time someone reported it. Sadly, no-one ever figured out why it does this for some users and not for others.

    The first time I heard of it was almost two years ago. And we tried to figure out if there was anything different that would account for it, but that obviously failed.
  • I run it on an non-privileged account. Don't know if that makes a difference..?
  • I run as Admin on my system. Can anyone else who has the frequent write problem confirm or deny the privilege being a factor?
  • Guys... Ever heard of write caching? Look it up, it's awesome, and almost everyone does it. Not every write to the file will actually end up on the storage media.

    Anyway, someone try creating the nolog file before starting PIA Manager, and then check if it still logs.
  • edited May 2014
    Yes, this has been an issue I've noticed for months. I use an app on windows called tail, and watch the openvpn.log and piamanager.log files, which the app refreshes once a second. These files are being written to all day non-stop.

    Here's before:

    image

    And after:

    image

    And task manager before:

    image

    And after:

    image
  • Guys... Ever heard of write caching? Look it up, it's awesome, and almost everyone does it. Not every write to the file will actually end up on the storage media.

    Anyway, someone try creating the nolog file before starting PIA Manager, and then check if it still logs.



    Now that does make sense (I had never heard of write caching before), but Killswitch claims he can hear the drive constantly clicking which implies it is actually writing to the drives.

    It is possible that he has write caching turned off.  I just checked my drives and it is turned on (the default).

  • It also depends on the file system and the energy settings and the type of cache. And lastly, some drives click even if no data is written.
  • Just to eliminate the possibility, can you verify that there are no stupid scheduled tasks on your system for the times you are checking? No defragmentation from Windows or another application, no indexing being done, and no updates being applied in Windows as a whole or the AV and other tools you have installed?
  • This constant disk access is really killing my Windows Server disk performance.  It causes disk thrashing.  I am currently using the PIA application.  Is OpenVPN better, or does it also use the same rubyw.exe and other programs that are constantly hitting the disk?   
  • OpenVPN does not need all that nonsense.
    Currently, PIA does not support advanced encryption settings for OpenVPN.
  • I'm a little worried about my SSD now. I uninstalled PIA with the intention of reinstalling it on my mechanical drive but it doesn't look like the installer allows you to choose a destination. I don't suppose anyone knows of anything I can do to get it installed on a different drive? I don't even care if it has to create a program files folder for itself, or a users\appdata\whatever either, so long as it does it on the mechanical drive.
  • edited May 2014
    Hi dude, you need to make a sympolic folder. Read this to learn how you can do it.
    Also you need to make pia run from install folder or else it will keep creating folders in your temp files assuming you didn't move it. So either move the whole windows temp folder using this or do only pia with this guide.

  • Nice one user1234 that seems to have done the trick as far as I can tell. Here is a screenshot of my resource monitor showing ruby/pia running on E: rather than C:

    http://imgur.com/QNahCpr

    for anyone worried about PIA eating in to the life of an SSD and you have a spare data drive hooked up to your computer it might be worth it to do this yourself.
  • You could also create a small RAMdisk and run it from that if you don't have a spare drive.

    I use a 1GB RAMdisk for my browser cache so I don't get a zillion files taking up space on my hard drive - the RAM is cleared when the computer shuts down.  I may shift the PIA temp folder to that same RAMdisk.
  • I may have spoken too soon. While it defiantly helped, if I close the pia application and let my computer sit for 5 minutes disk activity for both disks eventually goes to zero and pretty much stays there with the occasional jump for regular background stuff. process listed for disk activity in resource monitor go away completely with a couple svchost/system processes showing up every once in a while and then disappearing again.

    With PIA running if i leave the computer untouched for the same amount of time disk activity for both drives never stops. almost all of the disk activity for E:\ is explicitly PIA related. Processes causing disk activity for C:\ are system processes with the PID 4 that on first glance have nothing to do with PIA but I can't account for the reason they would disappear from the disk activity list when PIA wasn't running but would stick around when it is.

    Examples:

    I only had to wait 3 minutes with PIA off to get this screenshot,

    http://imgur.com/1tBG4Co

    I waited 20 minutes for things to calm down to take this screenshot. The processes from C:\ that would normally disappear without PIA running just plain never disappear

    http://imgur.com/i2JnDXe

    Maybe I am worrying too much? I JUST got my first ssd and I don't want to take years off of it's lifetime like omninegro mentioned up there when he did his math.



  • This is all logging stuff. While I understand that it certainly helps for technical support, having an option in the Client to disable logging would eliminate this mess if my guess is even close to accurate.

    I disable every last log I can on my system. Not because I think I need to hide the diagnostics from myself, but rather because I never need them unless there is a problem.

    Next version of the client should really have an option to disable logging.

    In OpenVPN all you need to do is change the *.ovpn file line that says "verb #" where the # is the level of logging to 0. (That is a zero, not a capital O.)
    http://openvpn.net/index.php/open-source/documentation/manuals/65-openvpn-20x-manpage.html

    Anyone know how to do the same for the PIA client?
  • I assume dude you didn't move the windows temp folder outside the ssd that's why you still notice this activity with pia. As i mentioned above you had to both move pia and temp folder or make pia static. Check 2 2 again cause i am pretty sure it will solve your problem assuming it's pia.
  • Yeah, it's either move temp or follow the instruction to run PIA from a static location, I opted for the latter. Do I need to do all 3?
  • Nope not really and from what i see from your image ruby and pia do activity on E which is your hdd i assume. So the activity you have on C is not from pia. From what i see you are fine and shouldn't worry. If your ssd manufacture has a tool to see total write on it monitor for a few days to see how it's going but my opinion is that is no longer pia issue. 
    For ssd in general is you do less than 30gb writes per day it will live for many many years and by the time it dies ssd space/price will go way lower.
    Just a tip in general cause i see you care about ssd writes move the browser cache to the hdd or to a ram disk assuming you have spare ram. 
    tldr Enjoy the drive and stop caring about drive writes assuming they are small. 
  • Yeah I get ya. They aren't explicitly PIA processes but I can't account for the fact that without PIA running they will go away and disk activity will settle at 0 but with PIA running they never go away and continue writing to SSD. It's like, they aren't a part of PIA but something PIA is doing is keeping them alive.

    Anyways thanks for the help I never knew about windows sym links before and I'm pretty stoked to have learned about them.
Sign In or Register to comment.