spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.36k stars 3.07k forks source link

consider building 64-bit Windows binaries (x64, x86_64, amd64, 64 bit, architecture) #6598

Open SomberNight opened 4 years ago

SomberNight commented 4 years ago

Currently we distribute three different binaries for Windows (portable, standalone, setup). All of these target 32-bit Windows (but they can run on 64-bit arch too).

We build 32-bit binaries for compatibility reasons mainly, but this means the process cannot use >4 GB memory. There are many MemoryError bug reports collected by Travis, where I believe users are not running OOM completely, they are simply reaching 4 GB.

see collection of issues at https://github.com/spesmilo/electrum/issues/5627 but also e.g. https://github.com/spesmilo/electrum/issues/6212 https://github.com/spesmilo/electrum/issues/6272 https://github.com/spesmilo/electrum/issues/6303 https://github.com/spesmilo/electrum/issues/6378 https://github.com/spesmilo/electrum/issues/4995

We should consider either building 64-bit binaries exclusively instead, or also building those in addition to current. (but we already build 3 binaries, so building two versions of each seems overkill)

It would be good to know how many users there are using 32 bit Windows.

See: https://stackoverflow.com/a/41497867 https://store.steampowered.com/hwsurvey/

Among the participants of the Steam HW survey (2020-08), AFAICT 32 bit Windows among Windows users is less than 0.51%:

Windows 10 64 bit:   92.22%
Windows 7 64 bit:     5.44%
Windows 8.1 64 bit:   1.70%
Windows 7:            0.29%
Windows 10:           0.14%
Windows 8 64 bit:     0.13%
Other:                0.08%
SomberNight commented 4 years ago

See https://www.bleepingcomputer.com/news/microsoft/rip-microsoft-to-drop-support-for-windows-10-on-32-bit-systems/

"Beginning with Windows 10, version 2004, all new Windows 10 systems will be required to use 64-bit builds and Microsoft will no longer release 32-bit builds for OEM distribution. This does not impact 32-bit customer systems that are manufactured with earlier versions of Windows 10; Microsoft remains committed to providing feature and security updates on these devices, including continued 32-bit media availability in non-OEM channels to support various upgrade installation scenarios."

ysangkok commented 4 years ago

I think that, depending on how the native code has been compiled, the limit may be as low as 2 GiB. See stackoverflow comments

SomberNight commented 4 years ago

I am able to increase the mem usage of the Electrum 4.0.3 release exe up to around 3.6 gigs before it freezes:

a = list(range(int(1.8*10**8)))

Interestingly, when using a python interpreter directly, namely the 32 bit "exe" build, it freezes at 2 gigs.

We are not bundling that exe however, but the the "msi" files: https://github.com/spesmilo/electrum/blob/1ea4e42a96f1dfc8aeb89dc8079cafcf7837e008/contrib/build-wine/prepare-wine.sh#L50

So I guess they have been compiled differently and indeed in practice there is a 2x difference.

SomberNight commented 3 years ago

note: the last Bitcoin Core release that shipped binaries for 32 bit Windows was 0.17.1 related https://github.com/bitcoin/bitcoin/pull/15939

SomberNight commented 1 year ago

another data source: https://data.firefox.com/dashboard/hardware