Author Topic: Linux no faster than WIndows !  (Read 4390 times)

Offline LarryC

  • Member
  • *
  • Posts: 56
Linux no faster than WIndows !
« on: 2016 September 17 15:12:57 »
I've been hearing how much faster PI is on Linux, so I spent the last 3 days getting Linux Mint 18 installed on my Windows PC as a separate bootable drive.  This was my first foray into Linux and it was...one heck of a challenge.   In any case, it now runs great and I pointed to the same swap files on an SSD that I had set up for my Windows PI - Linux/PI is on a HDD and my WIndows/PI is on a SSD.   I get 5900-6200 total score on the PI benchmark test with Windows, and I got only 5800-5900 with Linux.  I am a little disappointed.  I was expecting more of a bump in speed. 

We're my expectations unfounded? 


Larry

Offline sigurd

  • Newcomer
  • Posts: 35
    • The Lambda Conspiracy
Re: Linux no faster than WIndows !
« Reply #1 on: 2016 September 17 15:43:00 »
I suppose I'll throw out the observation that the tests are not equal given one uses SSD and the other a spinning disk. The base difference in performance is about an order of magnitude between the two disk types: 70-150 IOPS (I/Os per second) for HDD, and 2000-3000+ IOPS for SDD. In this context I should not expect that to amount to much, except in load times of applications or if you are memory constrained.

I don't think you are accounting for Linux OS swap versus Windows swap (for linux a separate partition on the HDD, on Windows a file on your C: drive). Swap files are used for context switching of processes, etc. Regardless of RAM they are always in use (though perhaps lightly). Since you are using a synthetic benchmark you can definitely expect the disk choice to impact the results. I wouldn't actually expect much difference (and your results indeed show that).

You might be able to eke out some minor performance benefits by using Linux in that you can more readily disable unnecessary system processes (hence leaving more for PI). But I would not expect identical machines to show wild swings in performance. I would expect minor swings based on the different code paths of the operating system APIs, but I would also expect that to be minor.

-esy
”My punctuality is well known. When The Revolution takes place, I'll be late, and I'll be shot as a traitor.”

Offline LarryC

  • Member
  • *
  • Posts: 56
Re: Linux no faster than WIndows !
« Reply #2 on: 2016 September 17 17:04:12 »
Thanks.  I presumed that since PI is loaded when the bench is run that what type of drive the program was on would not matter that much in the test, but perhaps I need to re-think that.   

I also presumed I could use the same swap files, at least PI didn't object when I pointed at the same files I set up for my WIndows PI.  Are you suggesting I should have a separate partition for Linux PI swap files? 

I appreciate the confirmation that perhaps I shouldn't really expect much from going to Linux, but I have notices that nearly all of the highest posted bench scores are on Linux and are noticeably higher than comparable scores on the same CPUs on Windows.  That and there are several people that tout their
amazing PI speed" on Linux had me convinced that there would be a noticeable, though not magical, performance increase.

Larry


Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Linux no faster than WIndows !
« Reply #3 on: 2016 September 17 18:02:09 »
Larry

Most of the postings I've seen for the fast Linux benchmarks have been with fast SSD's and or Ramdisk for swap files. Windows doesn't seem to be able to work with ramdisks in the same manner that Linux can. Here is a posting from Juan earlier this week that might help.  http://pixinsight.com/forum/index.php?topic=10194.msg64561#msg64561



Mike

Offline sigurd

  • Newcomer
  • Posts: 35
    • The Lambda Conspiracy
Re: Linux no faster than WIndows !
« Reply #4 on: 2016 September 17 18:46:10 »
Larry,

Performance is a complicated question. :-)

When speaking of swap we are talking two separate and distinct swaps:

1. Operating System swap
2. PI image data swapping

The OS swap is where Windows or Linux swaps out "unused" applications freeing up memory for active processes. On Linux this is a separate partition. In Windows this can be a separate partition, but is more usually c:\pagefile.sys (< Windows 8 ) or c:\swapfile.sys. Both of these benefit from being placed on SSD.

The PI swap area is as described in Mike's link. Performance can be maximized by placing this area on SSD or on a RAMDISK (which nowadays is easier to accomplish in Linux). However, that being said, As Juan pointed out in the link, the way Linux manages memory and disk caching makes PIs use of a swap file almost transparent. This is due to the way Linux buffer disk I/O. Basically, on a Linux system unused RAM is allocated to the disk buffers so there is not really much of a performance hit for the kind of image data swapping that PI does.

File system performance is also a factor, though with Linux's buffering strategy less so in Linux than Windows. On Linux you also have a much better selection of filesystems to choose from each with different performance characteristics. So, one could, for instance, use different partitions (drives) to optimize a data set for reading (say astrometric catalogs) as opposed to writing (swap or cache). For general purpose use in most cases XFS is the filesystem one should use on Linux, ext4 is the other standard choice, but is in aggregate a slightly worse performer than XFS. I would not recommend any other filesystems on Linux at this time (btrfs i think will eventually succeed XFS for performance use cases). XFS is one of the highest performing file systems, and luckily enough the most stable. There is plenty of information about this topic on the series of tubes; which can help you make an informed choice if you intend to optimize.

-esy
”My punctuality is well known. When The Revolution takes place, I'll be late, and I'll be shot as a traitor.”

Offline LarryC

  • Member
  • *
  • Posts: 56
Re: Linux no faster than WIndows !
« Reply #5 on: 2016 September 18 06:59:35 »
Thanks for the explanations and link.  I ordered out new and faster RAM to set up a RAMdisk and will try re-installing Linux on one of my faster SSDs.   

Larry

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: Linux no faster than WIndows !
« Reply #6 on: 2016 September 20 09:41:47 »
Larry,

Did the same exercise as you just went through several months ago.  On comparable machines (new build desktop with SSD's and using a ramdisk in each case), Linux was faster, no doubt, but not enough to make switching back to Windows all that painful.  Its really an equipment issue at the end of the day.  My laptop, running windows, crawls, even with an SSD.  My desktop, on the other hand, is pleasingly swift in either set up.  But if you want speed and don't use the machine for things that Windows does better at (e.g., Office), then Linux is the way to go.

Best,

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline LarryC

  • Member
  • *
  • Posts: 56
Re: Linux no faster than WIndows !
« Reply #7 on: 2016 September 20 10:23:45 »
Jim,  are you saying you did go back to Windows?

I have no other reason to have a dual-boot machine as I use Windows for a lot of Photoshop, Lightroom, Office, Outlook, and various other AP software.  I intended to only use the Linux boot for PI.   If I can't get a meaningful speed improvement over Windows with the same hardware, I will probably bail on Linux. 

I have noticed that PI loads WAY faster in Linux, but as above, my PI benchmark scores were essentially the same.  If I could only open files from my Windows NTFS drives in PI I could actually test some processes (I'm working on it!).

Larry

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: Linux no faster than WIndows !
« Reply #8 on: 2016 September 20 11:18:06 »
Larry,

Yep, spent the better part of three months getting my head around Linux, played with it for a couple of months, then went home to where I was comfortable.  I would like to say that I regretted the decision, but I don't, not even a little bit.  It helps that when traveling I still use my laptop which makes my Desktop seem like the wind.  But in reality, we are only talking seconds of difference, not minutes, between using the Linux version and the Windows version and I am just not in that much of a hurry.  Its the same reason I never got into BPP.  I want to take the time to really understand what is happening and a few extra seconds of thinking time while the PI wheels are turning, is a help, not a hindrance.

For what it's worth.

Best,

Jim 
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline LarryC

  • Member
  • *
  • Posts: 56
Re: Linux no faster than WIndows !
« Reply #9 on: 2016 September 20 15:41:05 »
Jim,

Thanks for the comments. 

I get the feeling I too may drop Linux and refocus my efforts to increase speed the expensive way: faster CPU, more RAM and M2.x4  SSD. 


Larry

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Linux no faster than WIndows !
« Reply #10 on: 2016 September 20 17:51:03 »
the m.2 ssd is insane - i now have 2 of those in x4 pcie slots, one is the boot disk, the other scratch/swap for PI. 1500MB/s read speed.

rob

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Linux no faster than WIndows !
« Reply #11 on: 2016 September 30 02:17:11 »
It is not about execution speed. It isn't either only about free software or open source. It is really about having complete control on your hardware, software and data. It is also about the UNIX paradigms of filesystem and system administration. Sadly, most Linux users do not understand or care about any of these things, and only want Linux and open source because they are gratis. A sign of our times.

If I were forced to use Windows, I probably would drop everything related to software development, and would try to dedicate my remaining time to more interesting activities. Fortunately, we still have FreeBSD and Linux so computers will remain being exciting tools for some time.

Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline sigurd

  • Newcomer
  • Posts: 35
    • The Lambda Conspiracy
Re: Linux no faster than WIndows !
« Reply #12 on: 2016 September 30 09:48:16 »
+1 to Juan's comment. It's about freedom.

Though, however unfree, i'm not giving up my MacBook for Gnome or KDE anytime soon. :-)

-esy
”My punctuality is well known. When The Revolution takes place, I'll be late, and I'll be shot as a traitor.”