Slashdot Mirror


Can .NET Really Scale?

swordfish asks: "Does anyone have first hand experience with scaling .NET to support 100+ concurrent requests on a decent 2-4 CPU box with web services? I'm not talking a cluster of 10 dual CPU systems, but a single system. the obvious answer is 'buy more systems', but what if your customer says I only have 20K budgeted for the year. No matter what Slashdot readers say about buying more boxes, try telling that to your client, who can't afford anything more. I'm sure some of you will think, 'what are you smoking?' But the reality of current economics means 50K on a server for small companies is a huge investment. One could argue 5 cheap systems for 3K each could support that kind of load, but I haven't seen it, so inquiring minds want to know!"

"Ok, I've heard from different people as to whether or not .NET scales well and I've been working with it for the last 7 months. So far from what I can tell it's very tough to scale for a couple of different reasons.

  1. currently there isn't a mature messaging server and MSMQ is not appropriate for high load messaging platform.
  2. SOAP is too damn heavy weight to scale well beyond 60 concurrent requests for a single CPU 3ghz system.
  3. SQL Server doesn't support C# triggers or a way to embed C# applications within the database
  4. The through put of SQL Server is still around 200 concurrent requests for a single or dual CPU box. I've read the posts about Transaction Processing Council, but get real, who can afford to spend 6 million on a 64 CPU box?
  5. the clients we target are small-ish, so they can't spend more than 30-50K on a server. so where does that leave you in terms of scalability
  6. I've been been running benchmarks with dynamic code that does quite a bit of reflection and the performance doesn't impress me.
  7. I've also compared the performance of a static ASP/HTML page to webservice page and the throughput goes from 150-200 to about 10-20 on a 2.4-2.6Ghz system
  8. to get good through put with SQL Server you have to use async calls, but what if you have to do sync calls? From what I've seen the performance isn't great (it's ok) and I don't like the idea of setting up partitions. Sure, you can put mirrored raid on all the DB servers, but that doesn't help me if a partition goes down and the data is no longer available.
  9. I asked a MS SQL Server DBA about real-time replication across multiple servers and his remark was "it doesn't work, don't use it."

21 of 653 comments (clear)

  1. Christ, those machine figures! by abulafia · · Score: 5, Interesting

    I hate to say it, I've been too long out of the MS development world. That kind of overhead managed to amaze me.

    I'm deploying systems right now (some buzzword compliant, some (more efficient ones) on lowly little open source, that scale to an order of magnitude higher transaction volume at a fraction of the cost. No, none of them are windows.

    No wonder my company has been doing well in a downturn. (Oh, sorry, we're "recovering" now.)

    --
    I forget what 8 was for.
  2. What the web app doing? by ThatDamnMurphyGuy · · Score: 2, Interesting

    100 concurrent users isn't a lot.

    What is the web app going to do? All the hardware in the world, and even open source won't help you much if you're trying to do the wrong things on a single machine. Database driven site? Commerce? HEavy read, heavy write, or both?

  3. Re:Hmm so Linux is cheap by wfberg · · Score: 3, Interesting
    ... but Unix/Java programmers aren't. Wanting to write the code for free, too?


    Seems to me swordfish is going to be coding it anyway. I'm sure he can figure out how costly it is to retrain him to program Unix/Java.

    Having said that, colleges/universities are churning out Java programmers at an alarming rate. And seeing how unemployment is only rising (lots of experienced people on the market) newcomers are really, really cheap! (They're used to living like.. well.. like students!)

    Also, is programming for this new-fangled .Net thingy really that much easier than programming for "Unix/Java"? Or is that a delusion caused by smoking crack? Surely coding for platforms that have been around for years upon years is a no-brainer moreso than programming for, from the way swordfish describes it, a hideously unstable inefficient platform?

    Now, I agree that finding reasonably adept administrators for windows is much easier, and cheaper, than finding ace Unix admins. But that doesn't say anything about coders.

    If swordfish is doing a feasibility study on this, for Pete's sake, suggest an alternative with less Microsoft in it! Any reason why that server should be .Net if all it spews out are more or less standard webservices messages?
    --
    SCO employee? Check out the bounty
  4. Re:Java is a DOG by phnx90 · · Score: 4, Interesting

    I got to tell you its probably not java more the actual application server and/or the application. We use ATG Dynamo, and for that we get what we pay for: More than 4000 concurrent users ( active sessions ) per Dynamo instance with out any problems). Although with Version 6, they've decided to go all J2EE Buzzword compliant and complicated the entire setup.

  5. Faster is not the only concern for many businesses by PseudoThink · · Score: 2, Interesting

    Unless you're an ISP, you've got to colocate all that equipment. At nontrivial $$$/rack unit, a bunch of low-density (performance) desktop machines will quickly eat up their performance cost gain in additional hosting fees. Plus you have to consider extra licenses. At $1200/Windows 2003 Standard license and $3500/SQL 2000 CPU license, buying the software for the additional machines substantially boosts their actual cost, unless you're using open source stuff. Of course, this thread isn't about open source, it's about Windows and .NET.

  6. Middleware said it could. by wjsteele · · Score: 2, Interesting

    I know... flame me. But ignore taking religious sides for a moment and just look at what their numbers could produce for under $37k. They were able to exceed all of your performance requirements including using dynamically generated SQL.

    hth,

    Bill

    --
    It's my Sig and you can't have it. Mine! All Mine!
  7. Re:Why are they running Windows then? by mickwd · · Score: 2, Interesting

    There is a valid point behind what you're trying to say.

    But reading comments like this, is it any wonder that businesses, "small" and large have stopped spending so much money on IT recently ?

    As far as businesses are concerned, computers are just tools to do jobs, to help those companies generate money. If they don't help make them money, there's no reason for them to spend money on IT.

    And here we are telling those companies they don't just have to buy the equipment, and the software, they have to continuously spend time and money on people to protect them, look after them, and update them.

    No wonder companies are beginning to ask "what's the benefit ?", "why should I spend this money ?".

    And no wonder IT people are beginning to ask "where are all the jobs ?".

  8. Re:Are you asking about .NET, or something else? by GoofyBoy · · Score: 2, Interesting

    > Plus, I'm confused - what's your alternative? What database are you going to recommend that allows you to embed C# (C++, whatever) programs in the database itself?

    Oracle 9i and maybe 8 allows you to use Java for stored procedures.

    It has some performance improvements over PL/SQL but I never really thought that it was useful. More like "another shiny button" added to a product.

    --
    The surprise isn't how often we make bad choices; the surprise is how seldom they defeat us.
  9. What?! by SlashChick · · Score: 3, Interesting

    "If one of the servers has a problem - I can remotly fix it over my cell phone connection, and I don't have to charge them travel time. If it was Windows - I'd have to drive there."

    What?! You've never heard of any of the following:

    -- Terminal Services
    -- VNC for Windows
    -- Remote Desktop commercial programs

    I am sorry, but that is just on crack (and so is whoever modded you "Insightful".) In fact, with Terminal Services and the rdesktop client program, you can even administer a Windows desktop or server from a Linux or Mac box. Yes, you can do remote reboots, remote software patches, remote software upgrades, and pretty much everything else.

    There are lots of valid reasons for using Linux/BSD/UNIX, but being ignorant about Windows certainly doesn't help your case.

    1. Re:What?! by zulux · · Score: 5, Interesting


      What?! You've never heard of any of the following: -- Terminal Services -- VNC for Windows -- Remote Desktop commercial programs


      Yes I use them all the time, but when I'm on the road I have to manage servers over my CELL PHONE coneection. Window Termmial Services is unsuable in that situation.

      Here's an example:

      With UNIX I'm in Ireland (I'm usually based in the US) and I get a call "We just got a new user, could you add them"

      I whip out my Ericcson 68i and Sharp Zaurus - and ssh into the server and run a script to add the user.

      With Windows: I have to find a "Internet Cafe" pay 10 Euros, and convince the owner of the cafe to let me install VNC. Then I get to S-L-O-W-L-Y use the gui to add the user.

      It get's even better - I can remotly manage my servers in the absolute wilderness with an Iridium satelite phone and a Zaurus with a serial cable. At 9600 baud, I can do it with UNIX - but Windows, forget about it.

      --

      Moneyed corporations, non-working 'poor' and criminal prisoners are turning productive citizens into tax-slaves.

  10. It depends by boatboy · · Score: 2, Interesting

    Short answer: Yes, Windows IIS (which serves .NET WebServices) supports well over 100 concurrent connections.

    Long answer: It completely depends on what you are doing. As one person pointed out, if you are performing very complex queries, then scalability would go down. There's plenty of room for bottlenecks.

    One of our ASP.NET applications benchmarks at about 90 concurrent requests on a dual proc 1Ghz xeon. That's with several database reads per request.

    Your question is if ".NET scales", but really you could break your problem into at least three questions:
    1) Does .NET scale well?
    Yes. It scales extremely well, provided you follow best practices and design a scalable app.
    2) Does SQL Server scale well?
    Well, but probably not the best. Again, depends greatly on the design.
    3) Does IIS scale well?
    Well, but definitely not the best. IIS is designed for extensibility and scalability. Obviously they made trade offs in each area. Other servers are be more scalable, but less extensible.

    Given that, I would recommend doing some very simple benchmarks: Write a webservice that returns a hard-coded string. Test that. Next write a service that connects to a database and returns or adds a single record. You get the idea. You can use MS Application Stress Test for this.

    Another option is to use programs like RedGate ANTs and Query Analyzer to track down any bottlenecks in your code and SQL.

    You may also consider options like remoting or even writing your own multithreaded server if you think you can squeeze better performance by implementing a thinner transport...

    Finally, while you may not want to change the web server or development platform, you do have fairly wide range of choices as far as databases go. You could use MySQL backend, or any database you thought was better\cheaper than SQL server.

    In the end, I think this question is too complex to simply blame on ".NET".

    Good luck.

  11. Match.com Developer's Blog by jalilv · · Score: 2, Interesting

    Match.com has ported their website to .NET. One of the developers of the site, Jason Alexander, has posted a post mortem on his blog. While they have 45 servers in their web farm running the site, he may be a very important source that can answer your question.

    - Jalil Vaidya

  12. Re:.NET Benchmarks by hellswraith · · Score: 2, Interesting

    Not really the point of the poster. The machines he is specifying are cheap, like around 500-1000 dollars cheap. WELL below the 20,000 price the poster is posting. Through another couple thousand dollars at the hardware and a few more for licenses from MS, you are only looking like 5000-10000 dollars for more than enough power to do what the poster needs to do. The problem is the poster doesn't know very much about .Net and the technologies he wants to use.

  13. Two different questions. by FatherOfONe · · Score: 2, Interesting

    Your first question is can .Net scale? Answer is yes. The second question is can .Net scale on your budget? That is much harder question to answer. My initial reaction is no, given your concernes and the amount of effort you have already put in to it.

    I am by no means a fan of Microsoft. To be honest I hope that your projects dies, and this can be added to the long list of people that I know who bet the farm on Microsoft just to either have far more NT servers than employees, or they go out of business... but I will give my 2 cents.

    You seem to have defined some of the basic bottlenecks of performance. What you appear to leave out is what happens at certain loads. Does the system die? Probably not, but what happens to the response time? What are the acceptable requirements for the system? You may find 25 seconds for a page to load unacceptable, but the users may not. Either way it will let you know what goal you need to hit. Can you configure your DB to use less or more RAM?

    Next, is it for sure processor load that is the issue? My guess is that you would be far better off with an x86 chip with more cache and stronger memory bandwidth than a standard P4. Granted this involves another hardware purchase, but if that becomes an option at all look at an Operton or Xeon chip in a 2 way system. You can get one of those systems well under 4 grand. The Opteron flat out rocks and the new Xeon 3GHZ with 1MB cache should be hitting the streets soon.

    Not knowing much about the dark sides languages (Java is my thing), are you using one database connection throughout your application? Not returning it back to a connection pool, but storing it in the session object? This can have a significant impact on performance.

    Seeing that you said you talked to a SQL Server expert (I have never met one), I will assume that he looked through the code and optimized all the SQL. Everyone seems to be taking cheap shots an d saying you should have used product X, well here is my cheap shot... Next time use Oracle! I repeat next time use Oracle! Ok, it bears repeating one more time.... next time use Oracle. Granted it is expensive, but you are learning a lesson that a ton of shops here in Indy have had to learn the hard way. Well what the heck next time use Java + JBOSS or Resin + Oracle + Linux. In our environment it flat out rocks.

    What else is running on the box? You can buy a sub $500 machine to move all the DNS AD stuff to it. Not sure how much that impacts performance though... it may not be worth it. But my point is to turn off every unused service. Also, I will assume that you have applied every service pack, and called Microsoft. Since you are using ALL their products, you would think that they would help you. God I would love to be in on that call!!! All I ever hear them say is "You need to get off of product x" and use our product.

    Generally what I find to be the issue with performance is SQL and DB access. The code takes around nothing to execute processor wise. Now what kind of DB are you talking about? How many tables and how many rows in each table. What kind of transactions do you do (mostly inserts or querys). Are the indexes setup correctly on the tables? Could you flatten some relationships down?

    --
    The more I learn about science, the more my faith in God increases.
  14. Sounds like a troll by Anonymous Coward · · Score: 3, Interesting
    But I'll bite. I have a little experience with .NET stuff. From my limited knowledge of a couple high profile blunders in the financial industry, windows is very tough to scale to the levels Unix can (obvious duh). I will qualify this with real details. I'm posting AC for a reason, but you can probably find the details through google. The blunder I heard about was about a company that provides trading systems (OMS/Compliance), which managed to get their foot into two big trading firms in NY. The company went in with their solution which was apparently C++/Ole based app server with some kind of messaging system. I should mention this is second hand info, but it is well known in the industry for trading systems.

    The kind of loads big firms need to support are in the order tens of millions of users with millions of transactions a day. What I mean by transactions is buy process which can contain a dozen to a couple hundred individual orders. In other words, the number of complex insert/updates is tens of millions to hundreds of millions a day.

    For example, big firms like fedility, city group, thompson, vanguard, and schwab have millions of customers with hundred thousand plus portfolio managers. throughout a given work day, a portfolio manager may generate a couple hundred orders and submit them in one or two batches. This is done because it's cheaper for them. Can .NET scale well? Like what others say, it can if you design it right. For example, if you use MSMQ for it's designed job it works well. If you write your queues for MSMQ with plain hashtables and you don't index the messages, your chances of supporting 10K+ messages a second aren't likely. On the otherhand, if you write custom queue's, profile the messages, index them efficiently and make sure no other heavy weight stuff sits on the same box it can scale. Is that easy? No. You have to understand the problem you're trying to solve. Let's say hypothetically you have insane performance requirements like 100K+ messages a second for a messaging tier, you're better off using IBM MQSeries. Can you do the same thing with MSMQ? Sure if you build a bunch of custom stuff, write the messages to a database, index, partition and load balance. It will probably take you 8-12 months to do it, but you can with the right people and good hardware. Would you want to use XML for that messaging system? The answer is obviously no, if you want to keep the cpu and memory loads manageable.

    Many people have claimed they support thousands of transactions. Sure if all you're doing is insert into one table. Simple stuff right. Financial transactions like trading systems do a heck of alot more than a simple insert into one table. More often than not, a trade transaction with 100 orders goes into the database, affecting several tables. The middle tier then has to get events, and check the order to make sure it is valid and does not violate regulations or other compliance requirements. Sometimes it requires analytics like Tibco or what the industry calls Business Intelligence. Regardless of the server, stuff like analytics take time (seconds). Obviously if you're running complex analytics that scane 10 million rows of data with several joins in the query, you're better off using an analytics server like OLAP. Can .NET handle 1K analytics requests per second? If it's cached sure. If the nature of the data is very dynamic, like realtime trading systems, no way. doing that is very hard and most people avoid it.

    The key here is setting the expectations accurately, so your customer knows what is realistic. If you have a hard time communicating that to your customer or management, than find another job.

  15. A short guide to scalability by Earlybird · · Score: 5, Interesting
    The term scale in this context refers to the capacity for the software to meet growing requirements.

    In other words, if you define a target performance metric and find that a single user can access the system at better or equal that speed, then a system can be said to "scale" if it still performs within that metric, on average, when 20, or 50, or 100, or whatever users are accessing the system.

    Of course, due to the nature of computing systems, any system will hit a point where it will no longer scale to the requirements with the same hardware configuration. At that point we start talking about scaling upwards through hardware upgrades. But you can only upgrade hardware so far, at which point, again, the system will reach a hard limit on its ability to perform as required.

    The next logical step is to scale through redundancy: If a system can, in whole or (more commonly, as in "multi-tier" web clusters) in part, run concurrently in multiple instances, then you can scale by adding more instances of the system or system components: Multiple web servers, multiple "back ends", multiple database servers, and similar. This kind of organic scaling can be, in practical terms, near-infinite if a system is designed well; for example, multiple mirrored web servers serving static pages will scale indefinitely, whereas a trading system requiring inter-process synchronization through a message-queue system will most likely not.

    In scalability terms, efficient redundant clusters is the holy grail. It's the way Google scales, and it's how the core parts of the Internet scales.

    In the context of this Slashdot story, since the poster faces limited possibilities for investing in expensive hardware, he might consider going for the "many cheap boxes" route, if his Microsoft-dominated infrastructure permits it.

  16. IBM DB2 allows C / Java / COBOL / Fortran... by DenialS · · Score: 2, Interesting

    In DB2, you can write stored procedures and functions in many different programming languages, then call those routines through standard SQL. It's a nice way of reducing the network overhead that would be introduced if you had to send thousands of rows of data back to your client, then process the data on the client. Of course, it's also a little bit tricky to program...

    It was also pretty handy in the old days if you wanted to automatically trigger an email when your dinky little online sales site recorded a whopping $500 order for Idaho potatoes, and you had to warm up the jalopy so you could make the drive to Idaho.

  17. On a related note... by Mutiny+Evolution · · Score: 2, Interesting

    I just perused the Windows 2000 SP4 EULA and it states that it's against the licensing agreement to publish .NET benchmarks without Microsoft's permission. Why this was in the Win2k SP4 EULA is beyond me.

  18. Re:Why are they running Windows then? by stmfreak · · Score: 2, Interesting

    When I first started testing SQL Server using the default install "point, click and go" I was shocked to find that the performance for our application sucked.

    A quick lesson in optimization from the local DBA taught me how to tune it to use 80% of the physical RAM, keep log files on separate physical drives (and buss if possible) than the data file. If you can isolate log/data/os, so much the better. So I did that and performance immediately improved 3000% or more. I'm sure there are several other tune-ups I've forgotten and hundreds I never learned.

    Even so, IIS throughput for static and ASP apps (pre-.NET) was difficult to get above 200 and 100 concurrent connections respectively several years ago. Performance tuning is all about test, analysis, tinker... unless this guy knows where his bottlenecks are, there's not much anyone can suggest to help.

    And if he knows where the bottlenecks are, then he wouldn't be asking this question.

    The sad thing is that without analyzing the bottlenecks, people go buy faster CPUs where RAM was needed, or multi-proc systems with 15K RPM drives when moving to GigE would have done three times as much.

    Then there is the application itself. What is it trying to do? What can be cached? What is unnecessary? Can lookups be bundled together? I've seen Verity servers dragged down to 1TPS through crazy business requirements and poor development understanding. There is no such thing as a inherently fast platform. And no replacement for careful, analysis-based perforformance testing.

    --
    These opinions guaranteed or your money back.
  19. Re:What's your major malfunction? by fmaxwell · · Score: 2, Interesting
    The question "does .NET scale" means "how much room for improvement is there in how .NET uses a given chunk of hardware"; that's a question that is most easily answered by comparing .NET performance with the performance of other systems.

    For Christ's sake, did you even read the question? The very first line was:
    Does anyone have first hand experience with scaling .NET to support 100+ concurrent requests on a decent 2-4 CPU box with web services?
    He didn't ask for some lame-assed "you should use open source" troll.

    Second, the open source troll didn't compare the performance of open source to .NET, didn't suggest an open source alternative to .NET, or offer an appraisal of the performance of .NET. It was one line:
    If they're that strapped for cash they should be looking at open source.
    That'a a zealot for you. He's pushing open source when he doesn't even know if there is a viable open-source alternative, whether the company has staff with experience on non-Microsoft systems, or whether there are even specific features that the company wants that only .NET currently offers.

    Well, we know what your major malfunction is: you are one of those Microsoft zealots. Your support for that company is so irrational that you just don't want people looking at alternatives.

    How the hell can you decide someone is "one of those Microsoft zealots" because he tried to get someone to answer the question rather than using it as a way to push open source? This place is absolutely unreal sometimes. I swear to God that Microsoft could release a cure for cancer and someone on Slashdot would would recommend that terminally ill cancer patients wait for an open-source alternative.
  20. Re:What's your major malfunction? by Sawmill · · Score: 2, Interesting

    > To close, I want someone to respond to this post that has > successfully walked into a company that was strapped for > cash and wanted some Windows solutions,

    This is what my company has done since 1996, and their are times we get push back. However, 90% of the time, we end up saving the company significant money. On hardware, software, maintenance, support and development.