Author Topic: WinXP, SSD, and running winXP in a VM  (Read 766 times)

0 Members and 1 Guest are viewing this topic.

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4406
  • Country: gb
  • Doing electronics since the 1960s...
WinXP, SSD, and running winXP in a VM
« on: January 15, 2025, 08:57:40 pm »
There are numerous discussions about why XP trashes SSDs, and not much agreement.

My own experience is that it does damage them, usually after 1 year of 24/7 running (on e.g. factory test rigs). Usually the failure is "unable to find NTLDR" i.e. something at the start of the disk has been wiped.

Some say one should disable defrag, last access timestamps etc. That's all logical. Maybe the timestamps are the problem?

Anyway, I need to build a fanless PC, has to be winXP because it is running some weird old software for which there are no sources and which doesn't run on anything later. I've got it all running on a VMWARE VM for the XP gues OS, with a win10 host, and it runs fast enough with 16GB RAM. With 8GB, not really even though the WinXP VM has 4GB which is more than the 3.5GB which XP can use. I want to use an SSD because this should run for years. The SSD is an SLC type, too. 1TB and only about 10GB is being used.

Can anyone offer an opinion on whether the use of a VM will prevent SSD damage? The Win10 host should do the TRIM stuff correctly.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline Jackster

  • Frequent Contributor
  • **
  • Posts: 510
  • Country: gb
    • PCBA.UK
Re: WinXP, SSD, and running winXP in a VM
« Reply #1 on: January 15, 2025, 09:48:30 pm »
TRIM is handled by the host OS so should not be an issue running XP in a VM on a modern host PC. Maybe some slight wear still vs modern OS?

Linux and Wine might also be an option?

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 12375
  • Country: us
Re: WinXP, SSD, and running winXP in a VM
« Reply #2 on: January 15, 2025, 09:55:58 pm »
Installed an SSD into my XP oscilloscope in 2015.  Almost 10 years of service so far and no issue.   Consider I was told by an expert it would fail in a matter of a few weeks.   The key is the drive handles all the maintenance.   

https://www.eevblog.com/forum/testgear/teledyne-lecroy-waverunner-64xi/msg650893/#msg650893

I have used this same model drive in 4 different instruments now (Windows 2000 or XP) and not had a single failure yet. 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4406
  • Country: gb
  • Doing electronics since the 1960s...
Re: WinXP, SSD, and running winXP in a VM
« Reply #3 on: January 15, 2025, 11:04:33 pm »
Quote
TRIM is handled by the host OS so should not be an issue running XP in a VM on a modern host PC. Maybe some slight wear still vs modern OS?

That was my view too.

One also does some registry entries:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction]
"Enable"="N"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout]
"EnableAutoLayout"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"NtfsDisableLastAccessUpdate"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management\PrefetchParameters]
"EnablePrefetcher"=dword:00000000

and I suspect not doing these might explain XP issues with SSDs. The data point for that is that there were XP laptops with SSDs and those laptops didn't pack up.

Quote
The key is the drive handles all the maintenance.   

So I thought, and you can calculate how many TB can be theoretically written to say a 256GB SSD before every block has reached the ~10k write limit and thus no more writes are possible, but SSDs definitely do not work that way. There is more to it.

« Last Edit: January 15, 2025, 11:07:48 pm by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2315
  • Country: ca
Re: WinXP, SSD, and running winXP in a VM
« Reply #4 on: January 16, 2025, 12:15:55 am »
...
Can anyone offer an opinion on whether the use of a VM will prevent SSD damage? The Win10 host should do the TRIM stuff correctly.
My opinion is that this is the ideal situation. The virtualized XP has no idea about the physical underlying storage.  The virtual machine stores the data for the XP VM hard drive as regular files on your storage device. The host OS is the only one which interacts with the actual storage device, and since Win 10 is SSD aware, it will treat it relatively well. Don't make the XP guest disk size much bigger than necessary. This will help prevent old, no longer referenced data on the virtual disk from continuing to use space on the host SSD.

I also strongly suggest "overprovisioning" the SSD. That is, create a partition only on a fraction of the total disk space, and do not (ever) use the rest of it. If the disk is not factory fresh, then first wipe the entire thing. I would normally use Linux and the blkdiscard command on the drive (/dev/sdX or even better the link created by the kernel at /dev/disk/by-id/ata-[model]-[serial] which uniquely identifies the disk). Then partition the disk, leaving a generous 20%+ space unpartitioned. This space will remain unused, unmapped from the SSD perspective, so the SSD can and will use it during its internal housekeeping. Most good quality SSDs are factory over-provisioned, which explains why you see some 480 GB drives and some 512 GB ones. The 480 GB drives are probably 512 GB, but with 32 GB of factory over-provisioning.  My current Win10 box uses an old 240 GB Corsair drive, which has a factory-set 16 GB overprovision (it's technically a 256 GB drive).
 
The following users thanked this post: peter-h, rhodges

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8533
Re: WinXP, SSD, and running winXP in a VM
« Reply #5 on: January 16, 2025, 01:19:51 am »
I've been running XP and older OSes from SSDs and USB drives and never had any problems. No TRIM or anything else special. My advice is to use FAT32, not NTFS - the latter tends to write more - and turn off any unnecessary background services which may cause extra write activity.
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 2855
  • Country: us
Re: WinXP, SSD, and running winXP in a VM
« Reply #6 on: January 16, 2025, 02:01:59 am »
I run an old electronic CAD package with VirtualBox under WinXP.  For my home use, I shut the VM down because I can see the disk light flashing every few seconds when it is running.  I have the same setup at work, and have left the WinXP VM running for a very long time, with no SSD issues.
Jon
 

Offline Simmed

  • Regular Contributor
  • *
  • Posts: 83
  • Country: 00
Re: WinXP, SSD, and running winXP in a VM
« Reply #7 on: January 16, 2025, 02:27:04 am »
There are numerous discussions about why XP trashes SSDs, and not much agreement.

My own experience is that it does damage them, usually after 1 year of 24/7 running (on e.g. factory test rigs). Usually the failure is "unable to find NTLDR" i.e. something at the start of the disk has been wiped.

Some say one should disable defrag, last access timestamps etc. That's all logical. Maybe the timestamps are the problem?

Anyway, I need to build a fanless PC, has to be winXP because it is running some weird old software for which there are no sources and which doesn't run on anything later. I've got it all running on a VMWARE VM for the XP gues OS, with a win10 host, and it runs fast enough with 16GB RAM. With 8GB, not really even though the WinXP VM has 4GB which is more than the 3.5GB which XP can use. I want to use an SSD because this should run for years. The SSD is an SLC type, too. 1TB and only about 10GB is being used.

Can anyone offer an opinion on whether the use of a VM will prevent SSD damage? The Win10 host should do the TRIM stuff correctly.

i have the very old intel X series 80G SSD on winXP way way back, no issues for more than 10 years
mmm LTspice4  :P
« Last Edit: January 16, 2025, 02:34:14 am by Simmed »
V=I.R  Q=h.A.(dT) q=(dT).p  Q=C.V  F=m.a  F=q.v.B.(sinθ)
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: is
Re: WinXP, SSD, and running winXP in a VM
« Reply #8 on: January 16, 2025, 04:24:22 pm »
One way to tear up a SSD is using the drive as virtual ram / page swapping when the real physical system RAM is far too small for the total number of running applications or poorly written applications using the drive for RAM caching. You also want to limit all of the background chatter that XP seems to do e.g. indexing. I always noticed that when background applications are idle and I am not interfacing on the keyboard or any of the ports, it seemed that XP was still accessing the drive for absolutely no apparent reason. Seeing the hard drive actvity LED flash every two seconds while the system is basically idle sure is discomforting for SSD life expectancy!! A SSD cell has a limited number of writes for sure, but it also seems that reads have a destructive effect although to a far less degree than writes. I have an old Gateway ROG450 XP machine with an mSATA SSD module plugged into one of those adapter housings making it appear as a 2.5" I.D.E. laptop drive. I love the faster boot speed and overall performance. So far no issues!!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 12375
  • Country: us
Re: WinXP, SSD, and running winXP in a VM
« Reply #9 on: January 16, 2025, 05:53:40 pm »
Back when I installed the SSD into the DSO,  I read all sorts of posts about things that needed to be changed in XP to support it.   I had two scopes at the time that I installed an SSD.  Two different brands and interfaces.   Both XP.   The one, I disables the page file and made a few other changes when setting the drive up.  But the second scope, I mentioned earlier, I was curious if it would make any difference in the life of the drive:

Quote
I should mention that on this system, I did not make any changes to the system settings for the SSD.   I just mirrored the drive, installed it and used it.   It may shorten the life of the drive, but so far everything works great.    It just needs the protective cover.

https://www.eevblog.com/forum/testgear/teledyne-lecroy-waverunner-64xi/msg679270/#msg679270

So for what it's worth, XP just mirrored to this SSD with page file and every other setting left as factory set.  Almost 10 years of service so far.   

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4406
  • Country: gb
  • Doing electronics since the 1960s...
Re: WinXP, SSD, and running winXP in a VM
« Reply #10 on: January 16, 2025, 09:30:35 pm »
One thing I struggle with is how much the thing slows down in a VM. Maybe if you gave the host 32GB RAM... but I am doing this on a low power fanless industrial PC which can't take that much.

I also tried to run the in-VM code natively i.e. on a 2nd partition on the SSD, no VM. It "should" be possible to copy the VM files to this 2nd partition, but it never boots. Well, it boots into Windows and then I get the message that it didn't shut down properly, and do I want Safe Mode etc, but any of those options takes me back to the same page. Obviously the boot sector and the partition table and boot.ini are all ok. Even if I install XP on that partition (which obviously does produce a running XP system), I can't restore the other stuff over the top of it. I could configure the whole thing on that working XP install of course, too, but it takes a whole day to set it up. So I will perservere with the VM approach. It does run, just about.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2132
  • Country: au
    • Halestrom
Re: WinXP, SSD, and running winXP in a VM
« Reply #11 on: January 16, 2025, 10:04:07 pm »
\
My own experience is that it does damage them, usually after 1 year of 24/7 running (on e.g. factory test rigs). Usually the failure is "unable to find NTLDR" i.e. something at the start of the disk has been wiped.

I recall XP hosing its bootloader back in the day randomly.  Memories of using "fixmbr" from an install disc are still firmly burned into my head.

I also know of systems where XP has run perfectly well for 20 years, but they tend to be the ones with very narrow or minimal usage.

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 9415
  • Country: fi
Re: WinXP, SSD, and running winXP in a VM
« Reply #12 on: January 17, 2025, 08:59:57 am »
One thing I struggle with is how much the thing slows down in a VM.

Probably not much. Virtualization is not emulation, so virtual machines run close to the same performance as native applications. Try it to find out.
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4406
  • Country: gb
  • Doing electronics since the 1960s...
Re: WinXP, SSD, and running winXP in a VM
« Reply #13 on: January 17, 2025, 09:03:34 am »
I don't need to try it... I've been using VMs for many years.

They do run slower. Not "slower enough" if the host is fast. They run very considerably slower for the first minute or two, too.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf