can a virtual machine be used on a SSD drive?

Discussion in 'hardware' started by taleblou, Oct 24, 2018.

  1. taleblou

    taleblou Registered Member

    Joined:
    Jan 9, 2010
    Posts:
    1,268
    Hi:

    My hard is a 1TB SSD and I have windows 10 home latest and was wondering if I install a virtual machine, would it effect SSD negatively? I read that VM can interfere with TRIM function and is not advisable to be used on a SSD.

    So is harmful or does it reduce the lifespan of a SSD if I install a virtual machine like virtual box and others?

    I want to start testing some software in VM. Thanks in advance for your reply.
     
  2. Seer

    Seer Registered Member

    Joined:
    Feb 12, 2007
    Posts:
    1,839
    Location:
    Serbia
    You did not say which VM you're using, but all major players added TRIM support ages ago (on a relative scale). Virtualbox added it back in 2012. These are old changelogs, they keep them in bunches, scroll all the way to the bottom,
    I wouldn't worry about lifespan (perhaps someone can explain this better), the performance gain is worth the wear. Just set the virtual HDD to expand dynamically.
     
  3. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    8,196
    That's the only way to go!

    Maybe there's a speed advantage to committing full disk size, but it wastes too much space. I typically use 200GB dynamic disks for my Linux VMs, just in case. Sure, total dynamic disk size for all VMs may be 10-100 times actual physical disk size. But I can always move VMs to make space, if necessary.
     
  4. taleblou

    taleblou Registered Member

    Joined:
    Jan 9, 2010
    Posts:
    1,268
    i want to use either virtual box or VMware workstation. so these should be ok then?
     
  5. Seer

    Seer Registered Member

    Joined:
    Feb 12, 2007
    Posts:
    1,839
    Location:
    Serbia
    From my experience, it's on a placebo level.
    This here is a case of software testing, I would recommend allocating enough space to allow for OS updates to work uninterrupted + maybe a bit more. So 50 GB would be maximum IMO (with Windows in mind). To reduce I/O writes as much as possible.
    Everything's fine, just go ahead. Seeing that it is a 1TB SSD I assume it is newer. No worries about I/O writes if it is.

    [EDIT] Just to ease your mind, the issue with SSD lifspan from a perspective of a typical home user is a non-issue. I have one HyperX that I bought in 2012, it works almost 24/7 as a system disk (at home) and it is 92% good still.
     
    Last edited: Oct 25, 2018
  6. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    8,196
    I own ~20 SSDs, mostly ~120GB and ~240GB, from various manufacturers (mostly Kingston and Crucial). The oldest are maybe five years.

    And only one has failed so far. Just maybe a month ago, and it was one of the oldest. A ~120GB Kingston, for what it's worth. It didn't happen instantly. It was in a four-SSD RAID10 array. And it started dropping out. But it'd work OK for a while, if I forced it. But then it died for good. And the array got wedged.

    And unfortunately, the machine wouldn't boot. Because /boot was on /dev/md0 (with LUKS on /dev/md1). So, after replacing the SSD, I booted with a LiveCD, partitioned the new SSD to match its mirror, and rebuilt the array. It was a little frightening, I admit. Because I last had to do this ~five years ago, and my memory is iffy. But it wasn't really much of a problem ;)

    And the funny thing is that I'm pretty sure that this SSD was one that survived a small fire. My one and only computer fire. I must have been careless with one of the power connections, when working on a machine. So not long after bootup, I started smelling smoke, and then saw flames through ventilation holes. One of the SSD power connectors had started arcing, and the arc worked back 2-3 cm along the wires. That SSD was toast. Or at least, it no longer had a power connector ;) The adjoining ones had superficial damage, but still worked, in a test machine. But I did need to replace the power supply :)

    Modern consumer-level drive connectors are poorly designed, in my opinion. I liked the old style ones better.
     
  7. Seer

    Seer Registered Member

    Joined:
    Feb 12, 2007
    Posts:
    1,839
    Location:
    Serbia
    This now adds 1 to only a handful of cases I've heard of, and these were all older SSDs. But you RAIDed yours and any type of RAID adds (relatively high) I/O strain. If it wasn't in an array, I'm sure it would've seen a couple of happy years more.
    I once put a SCSI disc in an IDE HDD drawer. I don't remember how exactly I managed to do this, the internal connectors obviously fitted somehow. It was more than 20 years ago and I was clueless back then.
    I pressed the power button, a thick grey smoke instantly appeared and an unpleasant odor slowly filled the room. Since SCSIs were rather expensive in the 90ies, I instanty learned a profound lesson.
     
  8. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    8,196
    Power probably went somewhere the drive was expecting data :eek:

    But you know, until I had my computer fire, it never occurred to me that arc faults on 12V computer wiring were something to worry about. I mean, having worked on cars, I knew the risks of screwdrivers and 12V batteries. But somehow that knowledge didn't translate to computers. It seems that PC power supplies can crank out quite some amperage, if shorted!

    So I'm a lot more careful now about checking power connectors before booting :)
     
  9. Seer

    Seer Registered Member

    Joined:
    Feb 12, 2007
    Posts:
    1,839
    Location:
    Serbia
    Yes. I of course investigated this later, the number of pins was the same on both sides of the connector for both SCSI and IDE but they were differently assigned.
    It was one of my Mr. Bean moments that I've come to cherish dearly.
    Yes, it's not intuitive, we're used to much higher voltages in everyday life, so 12V looks like nothing. But it's actually huge when it touches circuits, I mean sandy bridges run on less than 2V.
     
  10. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    8,196
    True.

    But this wasn't just fried silicon.

    This was lots of melted and burned plastic, and even a little melted copper!

    Still, it was far less dramatic than the time I shorted out a 220V line ;) That was basically an explosion of copper and steel vapor :argh:
     
  11. Bill_Bright

    Bill_Bright Registered Member

    Joined:
    Jun 29, 2007
    Posts:
    3,224
    Location:
    Nebraska, USA
    Where did you read this? Got a link?

    There is no reason you cannot run VMs with SSDs. It is important to remember more and more computers (especially mobile/portable devices) come only with SSDs. Many PCs and All-in-Ones are SSD only. All our builds here for the last 5 years have been SSD only.

    As for SSD lifespans, I sure wish all the misinformation about lifespans and limited writes would go away, and for those spewing that hogwash would knock it off and educate themselves before flapping their lips. :mad:

    YEARS and YEARS ago, the number of writes for first generation SSDs was considered too low for certain applications. The reality is, that number was still astronomically high for most users. That is, even early users NEVER reached that number. Why? Because typically, the R/W "ratio" is write once to read many. And a SSD supports an unlimited number of reads. This is one reason SSDs are ideally suited to support busy Page Files!

    Fast forward to today and today's modern generation of SSDs and the number of writes is still limited, but the number is magnitudes higher than first generation SSDs. Additionally, SSD makers and OS makers are smarter too and know how to properly use and manage SSDs to extend their lifespans even longer. You won't find a hard drive with a 10-year warranty with 600 terabyte writes (TBW)! (Sandisk too).

    The reality is the SSD is likely to survive longer than all the other components in your computer - except maybe the RAM.
    Not if a good one that meets the over-current protection requirements of the ATX Form Factor standard! In a properly functioning power supply, you can intentionally short the outputs and all that will happen is the PSU will shutdown. Of course, until Man can create perfection 100% of the time, there will always be units coming off the line that are not perfect, or that fail prematurely. PSUs can still be damaged during shipping or if misused or abused. And if Mother Nature decides to send a monster lightning bolt directly at you, nothing can stop it. But generally, if a PSU fails, in theory it will not damage any connected components. This is one of the primary reasons they use AC to DC power supplies in computers - because the low voltage DC outputs (3.3VDC, 5VDC and 12VDC) have less "potentials" to do damage than AC only PSUs.

    So until Man can create perfection 100% of the time, and until Man can create products that remain in that perfect condition forever, don't go shorting out your supply to see what happens! ;)
     
  12. Seer

    Seer Registered Member

    Joined:
    Feb 12, 2007
    Posts:
    1,839
    Location:
    Serbia
    :thumb::thumb::thumb:
     
  13. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    8,196
    I don't remember what brand/model PSU this was. But it came in a CoolerMaster box from ~2012.

    And the PSU did a lot more than shutdown. But maybe it was defective.
     
  14. Bill_Bright

    Bill_Bright Registered Member

    Joined:
    Jun 29, 2007
    Posts:
    3,224
    Location:
    Nebraska, USA
    No "maybe". Clearly it was defective.

    Note Ohm's Law (controlled by the Laws of Physics) says I = E/R (current = voltage/resistance). So if resistance drops (as in a "short"), current must go up. This is common knowledge taught to all who study electronics, almost from Day 1. So electrical engineers, circuit designers and electronics technicians account for such conditions - even if it is just with a simple fusible link in the circuit that "blows" when a specific current threshold is crossed.

    In ATX power supplies however, the over-current protection circuit is "tripped", that is, it kills (opens) the circuit and keeps it open until the over-current (short) condition is removed. And then the circuit is essentially reset and good to go again.

    But if there is a defect or damaged component, anything can happen. But those are rare exceptions and of course, exceptions do NOT make the rule.

    For the record, the ATX Form Factor standard became the industry standard in 1995. But its predecessor, the AT Form Factor standard which dates back to the IBM PC (1981) also dictated AT compliant power supplies use similar over-current protection features to prevent "collateral" damage to connected components (and to prevent houses from burning to the ground, and or death! :eek:) in the event of a PSU failure.
     
  15. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    8,196
    I don't disagree with your statements about current-limiting for ATX PSUs. But I'm not convinced that the PSU was simply defective.

    This was at least a 300W PSU, and perhaps 475W, because I had purchased that box to support six-disk RAID, with 15krpm 1TB SATA HDDs. The limit current for +12V would have been 12A (or maybe 18A) and the limit power would have been 144W (or maybe 216W). Dissipated in a few mm^3, that's enough to generate considerable heat, and do serious damage.

    What happened, I suspect, was that a loose SSD power connection started arcing. Initially, there wasn't much current, just what the SSD was drawing on +12V. But once enough insulation had burned, a circuit from +12V to ground became established via carbonized insulation. And then the current ramped up gradually to 144W (or maybe 216W). That's when I saw the arc light and flames, and the PSU shutdown soon after.

    Also, I don't know for sure that the PSU itself was damaged. But enough of the wiring harness was damaged that I decided to just replace the PSU. Rather than go to the hassle of rewiring it, and taking the risk that it had been damaged in other ways.
     
  16. Bill_Bright

    Bill_Bright Registered Member

    Joined:
    Jun 29, 2007
    Posts:
    3,224
    Location:
    Nebraska, USA
    If the PSU sensed a short and failed to shutdown, the PSU was defective. That's just a fact with ATX compliant power supplies.

    What might make sense is a "partial" short develops in a failed component (or with the component's connector, as you suggested) in one of the connected devices (motherboard, drive, or graphics card, as examples) causing a drop in resistance. Not a "short" which is 0Ω, but just a lowering of the resistance. The motherboard regulator circuits attempt to compensate. They may be successful for a few clock cycles, but as soon as the resistance drops too much, and there is a demand of even more current the regulator circuits cannot handle, a "momentary" spike in current in the PSU would occur. But that then would trigger the PSU to quickly shutdown.

    What also might make sense with your connector scenario is the fact there is +12V, +5V and +3.3V in standard PSU SATA 15-pin power connectors. A

    Yes, when resistance goes down and voltage remains constant, current goes up, and so does heat. But that happens in milliseconds and those protection circuits are designed to kick in within just a few clock cycles - way less than 1 full second - not "gradually".

    Frankly, I don't see how that is possible with the way SATA power connectors are designed to (1) be hot-swappable and (2) only go in one way and finally (3), the fact connected device will only demand or "pull" from a power supply what the device needs. Power supplies don't automatically "push" out all their power.

    That is, if your computer needs 300W, the PSU will deliver 300W regardless if the PSU is a 350W, 500W or 1000W PSU. And that PSU (whatever its capability) will only pull from the wall 300W, plus ~15% more due to PSU inefficiencies.

    The only way that connector in your scenario would see more than that SSD would demand (typically less than 5W when taxed) is if the connector is damaged and the pins are bent making contact with something other than the intended pin socket.

    So the point remains the same. If the output of a PSU is shorted by some connected component, and the PSU is functioning properly, the PSU will immediately shutdown.
    It is important to remember PSUs, "IF" ATX compliant, are "intelligent" devices (even the most budget "ATX" PSUs). They are not like a "dumb" car battery (or any battery) that has no self-monitoring and regulating circuits built in. When you short out a battery, the chemical reactions creating the electricity are ongoing and keep pumping out juice until your screwdriver melts, or it gets so hot you drop it, or something else goes up in smoke and "opens" the circuit, or the battery dies like you left the lights on. The battery does not shut down like ATX PSUs are required and designed to do.
     
  17. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    8,196
    I suspect that the connector was loose, but not otherwise damaged. So yes, there was just a ~5W arc, for a while. Until insulation carbonized, and then the current spiked. As I recall, the machine was up for at least a few minutes before I smelled smoke. And soon saw light.

    But anyway, maybe the PSU was defective. I could do some tests, but the question isn't that important to me ;)
     
  18. Bill_Bright

    Bill_Bright Registered Member

    Joined:
    Jun 29, 2007
    Posts:
    3,224
    Location:
    Nebraska, USA
    In your case, I would not assume there was only one fault. As often happens in electronics, there is one initial event that then causes a cascade event - that is, a failure in one device or component damages another, then another. Regardless, in a properly functioning PSU, it would take milliseconds to sense an over-current situation on its outputs, and shutdown. It it didn't, that could create a very serious situation, to include a catastrophic fire. That's the only point I'm making. And actually, the hope would be the surge and spike protector, UPS, or even the facility's circuit breaker would trip long before that happened.
     
  19. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    8,196
    Yes, I get the argument. And I suppose that I ought to be reassured that what I experienced is very unlikely. And would only happen if the PSU were defective.

    But the facts of what happened are undeniable. The plastic around the power socket on the SSD was burned away. And as I recall, there was no power socket left. Also, insulation on the power wires to that SSD had melted maybe 3 cm from the plug.

    I do vaguely recall that I was booting from multiple SSDs, testing various systems and whatever. I think that I added the soon-to-be-dead SSD rather casually, attached with double-stick tape. And so the data and power cables were maybe too short, and maybe a little strained. With the power plug, in particular, not seated correctly.

    It'd be really cool if, given those mistakes, a properly functioning PSU would shutdown before damaging anything. But my concern is that there's an edge case, where the current exceeds what an SSD would normally draw, but remains under the limit for a huge high-rpm HDD. So if that happened, how much physical damage could occur?
     
  20. Bill_Bright

    Bill_Bright Registered Member

    Joined:
    Jun 29, 2007
    Posts:
    3,224
    Location:
    Nebraska, USA
    It would be cool but I don't see how it could happen with today's PC standards. The problem is many-fold. Not all SSDs have the same maximum power consumption specifications. And PSUs don't know what specific device is connected to their SATA power connectors. It could be a power hungry, heavily used 10K Raptor hard drive, or a thrifty SSD that is barely used. Or the user might put a Y-adapter and power two drives with one connector. It would take major design changes (read: much more expensive PSUs) to make a PSU that is capable of sensing the maximum amount of current any specific connected device (among 1000s and 1000s out there) can handle, and then limit that current on each connector. And each connected device would have to be programmed to tell the system the maximum amount of current it can handle too - adding to the costs of those devices.

    Note a SSD typically pulls less than 5W tops while a hard drive may need up to 10W. And then a Blu-ray burner could easily demand 30W! :eek: :ninja: A PSU does not know if a connected device is a SSD or Blu-ray burner that needs 10 times the power to function.

    Don't forget that most PSUs have just one or two 12V "rails" and then just one 5V and one 3.3V rail on the output side of the PSU. This means all the supplied 12V connections are tied in parallel to just one or two 12VDC PSU output circuits. And the 5V and 3.3V outputs are tied to just one each. So if you have 4 drives connected, the PSU will see just one or two 12V loads, not four. More if you have 12V fans, LED lighting, etc.

    So good idea, just not practical. :(
     
  21. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    10,961
    Location:
    The Netherlands
    I believe I asked the same question months ago. Because I don't want to stress my SSD I decided not to install any virtual machines. I haven't read whole the thread but is it an option to buy a separate SSD for this purpose if you don't want to risk your main drive?
     
  22. Bill_Bright

    Bill_Bright Registered Member

    Joined:
    Jun 29, 2007
    Posts:
    3,224
    Location:
    Nebraska, USA
    This I don't get. Why not? I would much rather stress a pure electronics device than a mechanical device.
     
  23. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    10,961
    Location:
    The Netherlands
    Because I still don't believe that current SSD's are just as trustworthy as HDD's. But would be cool if you could install virtual machines on a separate SSD, I wonder if this is possible. On my new machine I will install three SSD's. One for OS and apps, one for data storage and one for virtual machines if possible.
     
  24. Bill_Bright

    Bill_Bright Registered Member

    Joined:
    Jun 29, 2007
    Posts:
    3,224
    Location:
    Nebraska, USA
    Well, I don't see how you can think a device with multiple motors, gears, bearings, and mechanical arms (with attached wires) that must constantly swing back and forth can be more trustworthy than a device that has none of those. But does it really matter? Using one over the other does not negate the need for a reliable and robust backup plan.

    That said, I still don't get your point. Whether you run a program directly on your computer, or you run that same program in a VM running on that computer, it really puts no additional "stress" on the drives. Most of the "work" is still done in RAM and by the CPU, not the drives.
     
  25. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    8,196
    Sure. In VirtualBox in Linux, a VM's files by default go in "/home/user/VirtualBox VMs/[vm name]/". That normally includes the VM's virtual disk(s). But you can put them somewhere else, if you like. Even on an external USB drive, although that adds considerable latency. I'm sure that it's similar in Windows.

    You can even write a virtual disk to ramdisk before starting the VM :) That's the VM equivalent of a LiveCD. By default, nothing gets saved when the VM shuts down.
     
    Last edited: Nov 3, 2018
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.