DotNetZip performance issue, but only on one specific server - dotnetzip

I'm having a wierd performance problem with the DotNetZip library.
In the application (which runs under asp.net) i'm reading a set of files from the database and packs them on-the-fly into a zip file for the user to download.
Everything works fine on my development laptop. A zip file being about 10MB with default compression rate takes something around 5 seconds to finish. However, on the dev server at the customer, the same set of files takes around 1-2 minutes to compress. I've even experienced even longer times, up to several minutes. The CPU utilization is 100% when the zipping is running, but otherwise it stays around 0%, so it's not due to overload.
What's even more interesting is that on the production server, it takes something about 20 seconds to finish.
Where should I start looking?
Some hardware specs:
My Laptop
Development environment running on a virtualbox with 2 cores and 4GB RAM dedicated.
Core i5 M540 2,5GHz
8 GB RAM
Win7
Dev Server
According to properties dialog on My Computer (probably virtualized)
Intel Xeon 5160 3GHz
540MB RAM
Windows 2003 Server
Task Manager Reports Single Core
Production Server
According to properties dialog on My Computer (probably virtualized)
Xenon 5160 3GHz
512MB RAM
Windows 2003 Server
Task Manager Reports Dual Core
Update
The servers are running on a VMWare host. Found the VMWare icon hiding in the taskbar.

as mitch said, the virus scanner would probably be your best bet. that combined with the dev server being just a single core machine and the production server being a dual core (and probably without virus scanner) may explain a delay. what would also be valuable to know is the type of disk in those machines. if the production server and your laptop have SSDs and the dev server has a very old standard harddisk with low rpm, for example, that would also explain a delay. try getting a view on the I/O reads/writes for the zipfolder for the dev server and production server, you could use the SysInternals tools for that, and if you have a virus scanner or any other unexpected process running you're probably going to see a difference there. the SysInternals tools could be of value here in finding the culprit quickly.
UPDATE: because you commented the zip is created in-memory I'd like to add you can also use those tools to get a better understanding of what happens in memory. a delay of several minutes where you'd expect almost equal results because the dev server and production server are a lot alike has me thinking of the page file.. see if there are other processes on the dev server that have claimed a lot of memory. if there isn't enough left for the zip operation the dev server will start using the page file, which is very expensive.

The hardware seemed to be the problem here.
The customer's IT guys have now upgraded the server hardware on which the virtualized dev server runs and I now see compression times at about 6s for the same package size and number of files as on my local computer.
The specs now found in the My Computer properties window:
AMD Phenom II X6 1100T
3.83GHz 1,99 GB RAM

Related

How much RAM will be comfortably enough for Web Development in 2018?

I have old enough laptop. And decided to buy a new one.
Usually I use Chrome, Docker, Datagrip, Intellij, Slack etc..
Now I have only 8gb and it is really few.
I think that MB Pro 2018 (touch-bar) (i7, 16g RAM, 512g ssd) will be enough for my needs.
Or I should take 32g RAM?
Or I should not take MB at all ? (never used it before)
I have a i7/4 cores/8 threads/8GB PC which I still find comfortable to do development in different areas (Web Development/Embedded/Mobile/Qt5 on Virtualbox).
There is one key item that you did not mention which is a huge performance improver: switching from HDD to SSD.
My previous PC with similar caracteristics that broke down had a HDD inside and at some point I got tired of its slowness. I replaced the disk with an SSD and the slowness was gone. I've done the same on many other systems, including old ones (Windows XP, Windows 7, Windows 10, Linux, Pentium, Core i5, Core i7): all show significant improvements when switching to SSD.
Now when I buy a computer, I change the HDD into a SSD - it is worth the cost when using it professionnaly for development purposes.
The Web applications I develop are pretty "heavy". Of course my portable computer is about half as slow as the web application running on a server with higher clock speed, more memory (usefull for caching, ...). But I could surely tune my local server a bit more.
Of course, RAM will matter when you plan on running multiple virtual "computers" at the same time. I could clearly use more memory when running Android Studio, with one emulated android system running - running a Virtualbox instance with Ubuntu at the same time gets my computer in trouble.
And remember: it is better to choose a computer that allows you to upgrade RAM and disk(s). I always make sure that the computer can host a 2.5" SATA drive and that it is easily accessible.

Multi-platform development from one computer

I am planning to build a new development computer for both Windows & Linux platforms. On Windows, my development would be primarily in .NET/C#/IIS/MSSQL Server. On Linux—preferably Ubuntu—my development would be in Ruby and Python.
I am thinking of buying a laptop with Windows 7 pre-installed with 4GB RAM, Intel Core 2 Duo, and 320 GB HD; running 2 VMs for both Windows and Linux development with the host OS as my work station. Of course, I would be running DBs and web servers on the respective platforms.
Is this a typical setup? My only concern is running two VMs side by side. Not sure if this configuration would be optimal. Alternative would be to do my Windows development on the host Windows 7 OS. What are your thoughts?
I really like using VMs for development, because it makes it really easy to maintain different configurations, make backups, test comms between machines, experiment, and so forth.
Linux VMs work pretty well. Windows in a VM on Windows, however, can be a resource hog. You probably want more than 4 GB on the laptop.
If your not going to be switching between the two platform frequently, I would recommend repartitioning your hard drive after you get your machine, and installing Windows in one partition and Linux in the other. Doing things that way is usually simpler, in that you don't need the over head of the VMs.
Sounds like you will get 15 minutes out of this laptop's battery, maybe 20.
Speaking from experience, you will prefer a desktop plus a "more mobile" laptop. You can do this without spending more than you had budgeted (remember you can skip the monitor on the deskop), but that will probably get you slightly less specs in exchange for the flexibility and a laptop you really can take with you. But I recommend spending slightly more than you would on the single laptop, and remember you do get two machines out of it.
You can network between them (e.g. use remote desktop programs from the laptop to connect to VMs on the desktop).
In my particular case, about 6 years ago I needed a new machine that could be used for on-location photography and had the power, screen-size, disk space, etc. to run Photoshop and other tools (e.g. batch processing ~900 largish images was one use case). I got a beefy laptop, which worked great for that, but the battery quickly died and never had much lifetime in the first place. The system has always been more of a "slightly-easier-to-move desktop" than a laptop, and it sounds like you'd rather have a real laptop.

What do I need to know about running my own dedicated server (with windows 2008)

I'm thinking of getting my own dedicated server with the following stats:
Processor: Celeron 440 2.0 GHz
Memory: 1 GB
Primary Hard Drive : 160 GB SATA II
This will be running Windows. I have some experience with my local IIS and playing around with servers, but I have never set one up (at least a Windows one) and I've never dealt with DNS/backup/security issues.
My question has two parts:
Will this server be able to run Windows 2008, SQL Server, and possible Exchange on it without trouble. I'm worried about the processor and RAM.
Are there any guides/tutorials that talk about how to admin a windows server from start to finish. (I'm looking for something like the FAQs slicehost has for *nix based servers).
You WILL run into a problems with RAM. Refer to MS documentation and minimum requirements (SQL Server and Exchange). Also please mind that new releases of Exchange run only on 64bit systems.
Personally I would recommend installing CORE version of W2K8 if you plan to go with your described configuration.
It depends from user load. If you have about 1k unique users / month this means that probably, you will have 30 users per day - roughly 1 per hour. I think you will use more CPU working on this computer personally. So it really depends from user load.
If I were you, I would add more RAM to have something about 4 GB. RAM is the cheapest upgrade available.
You state "I've never dealt with DNS/backup/security issues."
I would suggest to you that these are the most important issues. You need to stay on top of security, applying security patches, insuring firewalls are properly configured etc.
Having been called after the fact for websites that have been hacked, I can tell you it is not pretty. Learn all you can before you stand up this server on the internet.

Staging, Testing, and Version Control Server Spec Recommendations

I am going to be working with a few outside developers for some ASP.NET projects and wanted to setup a co-located server for version control, testing, and staging client sites until they are ready to deploy.
I already have the ISP and have a 10 megabit connection burstable to 100, so I don't think bandwidth is going to be an issue.
My question is, what specs should the server itself have? I was thinking of getting a Dell server with the following specs:
Dual Core Intel Pentium E2180, 2.0GHz, 1MB Cache, 800MHz FSB
4GB, DDR2, 800MHz, 4x1GB,Dual Ranked DIMM
RAID 1 160GB 7.2K RPM SATA 3Gbps hard drives
Windows Server 2008
Will this suffice?
If the project isn't too big that looks fine. My experience with version control systems on large projects is that memory tends to be the biggest bottleneck. I'd make sure you can upgrade to 8GB RAM if the project is going to be large.

How practical is Virtual PC on a personal development machine?

Is virtual PC practical on a home personal development computer. I do some custom .net programming at home and I was wondering if in terms of performance and overall use, Virtual PC is useful. Do the applications inside Virtual PC session run slower. It will help me with my personal dev machine. Would you recommend any other products?
In my estimation virtual machines are one of the best tools that a developer can have. I have my base dev machine and on it I run VPC for different platforms to test installations and application functionality. For web development I keep VPC;s running each of the major browsers that I support, so I continually test my websites on various browsers. I even still maintain an old VB6 app and I have replicated my old VB6 build environment to a VPC image. Make sure you have lots of RAM. My machine runs with 4GB and that works well for most everything I need. I also have Sourcegear Vault set up for source code management. I have the clients loaded on the various VPC's that I use for development and they all check data in and out from my central SQL Server box. It works great.
It really depends on what your home computer is like. I've used VPC to test different versions of Visual Studio (e.g. to make sure that a solution is VS2005 compatible, and to check out VS2010).
I wouldn't want to use it all the time, but then I am working on a laptop. Given a really meaty multicore home desktop (preferrably with hardware support, of course, and lots of memory) it could be reasonably practical for day-to-day use.
VMWare Player is free and some people find it faster - I haven't used it enough to compare the two properly myself. If you're spend a lot of time "in" the VM, it would probably be worth giving both a proper test-drive.
VPC is a very good choice. I use it to test deployments and for presentation purposes.
If you have a PC with a new Intel chip and at least 2 gigs of RAM it actually works just as fast as a regular PC would :).
I recommend 4 gigs of ram though, they're cheap as hell these days and it really matters.
I've had some success with this; I had to develop some older .NET 1.1 software on Vista, which wasn't supported. I had to run XP in a virtual PC container in order to get the project done.
The biggest issue was available RAM; I'd recommend maxing out your home PC to use as much as it can- this will likely be less than 4GB unless you're running a 64Bit OS. I found that getting an extra gig of ram made life much better. Ram is cheap right now, so I'd start there if it didn't work well enough for me at first.
Yes applications will run slower but the hit isn't as big as you might expect. It is pretty reasonable to do development on a virtual machine. Obviously the performance is relative to how fast your computer is, a mulitcore machine will do nicely.
If you develop driver or core routines, where every mistake can and usually will result in a crash. A VM is the best you can use.
I tried Virtual PC and VMWare. They are both pretty good for such stuff.
Virtual PC should be fast enough, unless your driver or code is really time sensitive. A cross-platform, free alternative to Virtual PC is Virtual box.
If you've got a VirtualPC license already, by all means use it. If not, you might have a look at Sun's VirtualBox. It's Free/Libre and cross-platform. I use it to run windows and linux on mac os x and linux and have been quite happy with it.
You can run your dev tooling natively on your pick of O/S. and use VM's to test on other environments. Get lots of memory if you're going to do this, say 2GB or more - if you haven't already.
AMD chips have some facilities (nested page tables etc.) that improve VM performance. 2nd gen Opterons and some Athlon 64 chips will support this for reasonable money. You can even get brand-name hardware like an HP XW4550 with this sort of chip for fairly reasonable money. I'm not sure to what extent Intel has caught up with this yet.
Assuming your host machine has enough raw power then a virtual machine works fine. I have a 2.5GB ram, 2Ghz duel core work laptop and don't want to install vs2008 for personal development so have a virtual machine for that. I've given it 1 GB of dedicated memory at the moment and it runs great, no problems. If needed I'll up the ram allocation but for now I'm happy.
Hope this helps :-)
I use VirtualBox for all development and find the performance much better than VPC. My machine is about a 2 year old dual core with 4gb ram and performance is not noticeably slower than running natively. The virtual machines are Vista and the host OS is Windows 2008. I would definitely recommend using virtual machines as creating a fresh new machine for a new project is very easy.
I have a toshiba notebook with 2Gig of Ram. I am wondering if its worth to install Virtual box and use it to browse web, do quicken, some small dev work etc.? How would I install Windows OS on virtualbox virtual session? Are there good tutorials out there? Would 2gig of ram be enough to run virtual sessions on notebook computer with following configuration:
2 gig of ram
Intel Pentium 4 cpu
60 gig hdd