XCode compiling extremely slow inside VMWare - xcode

The OSX 10.6.6 is installed inside VMware on Windows 7 host. The overall performance is great, However, the compiling time increased dramatically (1 hour against 2-3 min on pure MacOS). It's modern machine with Core i5 & 4GB RAM.
Here are the XBench results:
http://db.xbench.com/merge.xhtml?doc1=517768&doc2=1&setCookie=true
I think the problem could be in extremely slow 4k write value, but I don't know how to improve this.
Is there any way to increase performance?
UPD1: swap is not used, there is enough memory for all operations
the disk speed is also not related, since my another Macbook shows event worse results, and compiles hundreds times faster.
UPD2: problem solved, see my answer below

Sharing experience and solution.
My Xcode was running fine but when I build a project (even an empty one), it would take up to 10 minutes.
SOLUTION:
Go to Xcode -> Preference -> Source Control: Dissable Source Control
Now projects build and run in a matter of seconds.

In VMWare, you should have a setting where you can dedicate one or two cores entirely to the virtual machine. Assuming you have quad core, maybe give MacOSX 2 or 3 cores? If you have dual-core and you've allocated 1 core to the VM (and the problem still persists), i can't say much then!

It's good that your problem is solved, but I want to share my experience for improving vmware performance. Please do install VMware tools for mac os and they are present in .iso file.
Steps to install VMware tools for MAC OS:
1) Power on your VM.
2) At the right bottom they are some pop-up symbols(These are usually not present in full screen mode). Rightclick the CD/DVD symbol.
3) Click setting. In this window make sure that darwin.iso is selected.
4) Close this window and again right click CD/DVD symbol.
5) Click connect. An icon will appear with name darwin(300).
6) Inside this file tools are present. Install them!

The problem was: VERY SLOW recursive searching of include paths. If non-recursive, everything works smooth.

I also got the same problem, But i want share my personal experience here.
My CPUs RAM capacity is 4 GB, So i allocated 3.5 GB to the VMWare
because of this it was very slow the entire operating system.
So one day i clearly observed the VMWare settings, finally found the
solution. If we allocate the RAM memory more than recommended then
also your operating system hangs. For my System the recommended RAM
memory is 2048MB, after adjusting this now OS is fast.
We can adjust the RAM memory in Devices option, inside Hardware. For
clarification here i am attaching the screen shot.

I had the same problem and I fixed it as follow:
Most boost I got with changing my vmware config file to disable memory
stored in .vmem file. In my .vmx file I added :
mainMem.useNamedFile = "FALSE"
prefvmx.minVmMemPct = "100"
Setting max cores to the guest
When programming with swift and XCode. Remove all comments /* */ not really used.

Related

Android Dev Kit in Eclipse

So I have a few issues with Eclipse and Android Dev Kit.
First of all Eclipse is being unbelievably slow and sometimes it renders it really useless. (It even lags switching the tabs!!!.)
I tried modifying the .ini file and tried allocating it even as much as 2gb-3gb ram. Still no improvement.
Is there any way to get it up to Visual Studio efficiency? When I'm debugging and I want to view a value inside a class in the watch it lags to display a simple 2 digit integer! Seriously W*F is up with that? VS instantineously displays 100s of objects in a collection with no lagging.
Also debugging is really slugish and it is really annoying! Steping from one line to another takes about 2 seconds!
My laptops has this spec:
Core i7-2670QM 2.2GHz (turbo up to 3.1GHz)
8GB DDR3 RAM
500GB HDD
GeForce GT630M 1GB (Dedicated)
This laptop handles some of the most demanding software and games without an issue and Eclipse lags!
Another issue, when I launch the Android Emulator my sound drops by around a half (for everything.) I use the internal sound card (integrated.) Any idea of how to fix it?
Thanks very much
Daniel Wardin
I fixed the issue after deleting everything to do with Eclipse and installing the x86 version instead of the x64 and the performance is a LOT better now!
It must be a design fault in the IDE.

Delphi extra slow compilation time

Well, there is a strange problem occured in my working project. It is written on Delphi. When I try to compile it, it takes 8 hours to compile about 770 000 lines (and it is not the end), while my colleague needs only 15-20 seconds.
I've tried everything suggested in Why does Delphi's compilation speed degrade the longer it's open, and what can I do about it?
Shorten the path to project
Defragment disc with MyDefrag
Use Clear Unit Cache (do not sure, if it worked at all)
I also turned off the optimization and I use debug mode. My PC is pretty fast (i5-2310 3.1 GHz, 16 Gb RAM, usual SATA HDDs), the bottle neck could be the HDD, but my collegue has usual one too. So, it is very mysterious, what is the reason of so slow compilation.
Edit: I apologize for lack of information. Here is additional info:
I use debug mode, release one works same.
We use Delphi XE version.
I've copied my collegue's folder with project initially.
I do not use network drive, and I tried to move project to another HDD.
Additional info about system: I use Windows 7 Enterprise N 64 bit, while my collegue uses Windows 7 32 bit, Also, Delphi XE is 32-bit (dunno, if it can be 64-bit). May be it is the reason in some way?
Edit 2: I found solution! The problem was that I installed Delphi on my Windows 64 bit system. Installing it on virtual Windows 7 x86 made it work: compiling in seconds. Dunno, why is there so big gap in perfomance.
Are you sure this is not some hardware problem, e.g. your hard disk having a bad sector? Try to put the source code on a different disk and see if the problem goes away. Or maybe the search path points to a network drive that is very slow or not even available?

Building a dedicated visual studio 2010 virtual machine, which path has least resistance?

I'd like to ask anybody who has built a virtualized VS2010 environment in VirtualBox or VMware, which one was able to work out of the box without too much tweaking? Or both need workarounds to get stuff working?
Both are fine as long as you install the respective tools and drivers provided for the guest OS
If you're using VMWare Workstation, you can leverage even more out of the environment by installing Visual Studio on the Host PC, and using the Guest VM for debugging, if your application crashes you can actually rewind back to before the crash and step through your code with the same heap and stack before it crashed!
Basically, I suggest going with VMWare Workstation. It's pretty cheap (assuming you get paid to program) and has many, many awesome features that you'll come to love. If you're a hobbyist/student programmer however, you'll likely find VirtualBox to be a little more functional than the free VMWare Player.
As far as performance goes, Intel and AMD both have shipped chips with hardware virtualization since 2005/2006 respectively. This is called VT-x or AMD-V, and often has to be enabled in the bios on older machines.
Basically this means that your BIOS handles Memory and I/O virtualization on this chip, while specialist drivers (e.g. VMWare Tools) are installed to improve graphics and mouse performance - effectively this means the resulting VM has near native performance with minimal overhead.
Hope that helps!
You can work with a VS2010/Windows virtualized environment with no problems.
I've worked with such combination and I had no problems. Both VMWare and VirtualBox are stable so far since years and Windows OS virtualization works properly.
Obviously, you can have performance loss, because a virtualized OS has more bottle necked access to resources than a host one, but current CPUs from Intel and AMD have advanced virtualization instruction extensions which accelerates virtualization operations.
So... Just go ahead!
I don't know your requirement but there is also a great alternative using Win 7.
You can create a vhd file and boot on the vhd file.
A few steps more, you can create a base vhd file with everything you need, mark it as readonly and create as many differential disk as you want.
The drawback of this method are these ones :
it's a bit tricky to create the base and diff disk, because you have to do it in the setup console of windows setup (but google can help you)
there is a small performance impact on the disk I/O (but lower than the visualization environment)
you can run only one system at a time. In fact, nothing disallow you to install a virtualization software
you can't have your "host" and it's potential tools (corporate email, etc.)
but at least, the performance will be greatly better than a virtualization software.

System Requirement for VS 2010

I have a laptop machine with below configuration:
Core 2 Duo # 1.4 GHz
4GB RAM
320GB HardDrive
Windows 7
Whether this is sufficient for installing VS 2010? The speed of processor is 1.4GHz, but in Microsoft website they have given minimum of 1.6GHz processor speed. Can anyone tell from their experience?
Thanks in advance.
Will most likely install, however I would expect it will run slow. Depends on what sort of work you are doing. Small console apps would be OK but I doubt full blown WPF/Silverlight apps would be speedy. Also, if your connecting to a local SQL instance.. etc (could pull an increased overhead).
Sum Up.
Will install.
Work will be tedious.
Another SO post for reference VS 2010 Requirments
The main issue is the way that VS2010 uses WPF; you might find that large files behave a little jerkily in the text editor, but I don't think it'll be un-usable.
I've not tried VS2010, but I do have VS2008 + SQL Server Express installed on a netbook with a few years old Atom CPU and 2 GB of RAM, and it works fine though it's obviously a bit slow. So I'd assume that you'll have no problems since even if the requirements for VS2010 are higher, your laptop is much higher spec than that netbook.
Will work. but might have some performace issues on Editor / Designer. I had a machine with almost similar configuration. used it for silverlight developement. I always has problem in the design preview of the XAML file. - it gets loaded after some time then expected time.

Virtual PC high CPU usage problems

I run VPC 2007 on my Vista business laptop with 4 gig RAM. I use VPC to run windows XP and maintain a VS2003 web project. At first everything was great. I assigned the VPC 512MB and did my work as usual. I also run Resharper and Visual SVN. Lately, the act of scrolling in a page causes the CPU to spike above 50, sometimes near 100. This freezes my machine occasionally and is frustrating. Typing code sometimes does the same thing.
I have experimented with changing allocated memory, disk space, turning on/off the paging file, uninstalling ReSharper and Visual SVN. There should be no reason this thing is slow with all the memory I have on this laptop! I don't have anything running on it but VPC at any one time.
I'm wondering if I should just install VS2003 on my Vista machine and deal with any incompatibility problems.
Any suggestions?
Try VirtualBox.
VirtualBox is a family of powerful x86
virtualization products for enterprise
as well as home use. Not only is
VirtualBox an extremely feature rich,
high performance product for
enterprise customers, it is also the
only professional solution that is
freely available as Open Source
Software under the terms of the GNU
General Public License (GPL).
If it were me, I'd run the VS.NET 2003 IDE on Vista natively. Just check out this page with the problems you might have:
http://msdn.microsoft.com/en-us/vs2005/bb188244.aspx
As far as your CPU goes, it could be a video driver/display issue. Have you tried turning Aero Glass on/off on your vista machine to see if that changes things? Are your number of colors for your desktop the same both in the VPC and on your host? Have you updated your video drivers recently?
I recommend VirtualBox. Every time I use VPC I soon give up because the performance is terrible. I run VirtualBox with a Vista virtual PC allocated 1.5gb ram and it runs really well. In fact I don't really notice much slow down from running natively.
First thing I'd suggest doing is run Process Explorer and Process Monitor to find out whats really eating the cpu. If it used to run fine, switching to another VM might not fix anything.
I'd bet VisualSVN is the problem. I had the same problem on a dual-core system with 6GB of RAM. I eventually just uninstalled it because it kept crashing the IDE.
BTW, I'm running Server2003 64-bit.
You probably have VPC07 runnning the active vhd at maximum speed. Go to options on the console menu and change this setting to divide CPU time equally among all vhd's and your problems will disappear!

Resources