I'm currently developing my Django projects on both:
Mac OS X 10.5, 32 bit
Ubuntu Server 9.10 64 bits (1 CPU, 512MB RAM)
Both of the above OS are using:
Python 2.6.4
Django 1.1.1
MySQL 5.1
Running 12 tests for one of my application take:
Mac: 57.513s
Linux: 30.935s
EDIT:
Mac Hardware Spec:
MacBook Pro
2.2 GHz Intel Core 2 Duo
3GB RAM
I'm running the Ubuntu OS on the same mac above through VMware Fusion 2.0.6.
You might argue that Ubuntu Server 64 bits is faster but I have observed a similar speed difference on Ubuntu 8.10 32 bits desktop edition. Even if I turn off my linux VM and other mac applications, I still experience the slowness. Has anyone else experienced this Django test speed difference across those two OS?
Found the answer:
Thanks to the comment from istruble and the answer from DZPM (I've +1 to you since I can't accept an answer in expired bounty question). It looks like the MySQL database as a test database on the mac is causing the performance issue. Using sqlite3 for tests make the test run time comparable on both platforms.
It depends on your tests, but the bottleneck should be in the database. Could you benchmark MySQL 5.1 in both platforms?
If that's the case, you should set the database in another machine, then configure your project to use it.
So what else is running when you have OSX running? You have Ubuntu Server, which is normally stripped down to just the essentials, running against a desktop OS that's got all kinds of crap running for the "user experience". I'm surprised it did as well as your numbers show.
The only way to truly compare the same app under 2 OSes is to make sure that both OSes are set up in essentially the same way for what you are measuring for.
Some string operations in Python appear to be significantly slower under OS X than under Ubunutu running on a VM on the same machine. Try this in your shell and see what kind of results you come up with:
from timeit import Timer
def sx():
for i in range(10000):
s = "%d" % i
min(Timer(stmt=sx).repeat(number=100, repeat=10))
With Python 2.6.4 under OS X 10.6.2 and a 64-bit Ubuntu (unknown version) with kernel version 2.6.31 in a VMware Fusion 2.0.6 VM, the OS X test takes 1.4x as long as the Ubuntu test. OS X fairs better under Python 3.1 where it takes a little less than 1.1x as long.
This does not explain your ~2x speed difference but it does show that Python can run slower under OS X.
Related
I have very old application(using specific language, CLOS based language) that was installed on a Sun Ultra 10(Solaris 2.6).
I have this OS, application source code with compiler.
I want to know whether it's possible to install this old OS(solaris 2.6) using old builds of VirtualBox, Vmware or others on my current Windows host(windows 7x76 or 10x64).
Any comments would be greatly appreciated.
The Sun Ultra 10 uses an UltraSPARC II CPU, and not an x86-family CPU. So you can't use VirtualBox or VMWare to run Solaris 2.6.
QEMU can be used to emulate SPARC CPUs. The UltraSPARC emulation (sun4u) is supported, but in beta.
I'm running Python 2.7 with Pandas, everything installed
with Anacondas Win 32bit distribution.
I got 4GB RAM, around 3GB are effectively used by WinXP on my machine.
Whenever I'm running scripts and the free accessable RAM drops below
1 GB there is a memory error thrown by the Python console.
No windows errors are observed.
Are there any known issues related to WIndows 32 Bit, WInXP and the use of Python?
I have a PC with AMD FX CPU (Do not remember if it was FX51 or FX60)
it is 64Bit does it means that I can run 64Bit Guests? even if it does not have the Visualization extensions in the CPU?
This is really more of a question for Server Fault, but I don't have enough rep to vote for a move.
Assuming you can even install ESXi 4 on that CPU, it will be able to run a 64bit guest.
I have Ubuntu 8.04 running on a Xen based VPS server that runs on a dual-core AMD Opteron 64-bit machine.
I have some locally developed C++ based daemons that I would want to deploy in that machine. My local machine is a 32 bit Ubuntu 9.04 running on an Intel core 2 duo laptop.
Can I execute binaries compiled from source code on my machine directly on the above mentioned server?
I am a newbie in this area. Would be great if someone could throw light on the standard practices in this kind of situation.
Thanks in advance
Xen is a hypervisor on top of which OSes are expected to run. It isn't an OS itself, in the normal sense of the word, and you can't build stuff to run on it. Unless the "stuff" is an OS, of course.
EDIT: Since Ubuntu is running inside the hypervisor, Xen itself is somewhat irrelevant. Pretty much anything you can do inside a normal Ubuntu install you can also do inside a Xen-hosted Ubuntu.
WRT deploying 9.04-built code onto an 8.04 system, it will often just work, though you can hit problems with library dependencies. One trick that may help mitigate this if you get into problems is to use debootstrap (apt-get it). It allows you to deploy a minimal Ubuntu or Debian version of your choice into a chroot environment. I've never used it, so caveat lector. A more heavyweight, but cleaner, option is to run a VM on your own system (e.g., Sun VirtualBox) and run 8.04 on it for doing release builds.
It is best to develop with the same OS that you deploy on to minimize differences due to configuration and libraries. It might work, but it could also break in the future when updated libraries are installed. I suggest you get on the same OS or simply recompile the source on the target server
I am trying to run VMWare Workstation 6.5.1 on Vista 64. It runs, but always as a *32 task. It is supposed to run as a native 64 bit task. I have uninstalled and reinstalled with no change. Any ideas?
Machine is a ASUS P5K, Intel Q6600 cpu, 8 GB RAM.
Thanks for any insight.
VMWare runs as a 32 bit task, but can still run 64 bit applications if you are running on hardware the supports the VT extensions. It can also access more than 4GB of memory because it plays a lot of tricks in the background.
Not sure what it is "supposed" to do, but mine runs the same as yours. Haven't had any problems with it either - in fact I am totally impressed with it having had it for just 2 weeks now. Amazing product.
I have a collegue with a very similar configuration, vista 64, vmware workstation 6.5. His VMS run as native 64 bit tasks in taskman. I have also seen other threads on the net that complain of the same issue. It appears that vmware workstation can indeed run as a native 64bit task and that there is a noticable performance difference yet no one seems to know how or why it sometimes runs as *32.