We are looking of moving our hosting solution over to Azure (we are a microsoft dev house so it makes sense). It just seems difficult to estimate costing for our hosting solution.   To give a simple rundown of our scenario. Our application is a simple asp.net frontend that backs onto an SQL Server database. We have a two tier setup on a VPS provider with 1 VM for the web box and 1 VM for the SQL box. When a customer comes onto our hosting solution they get a web application setup in IIS on the web box and a database connected on the sql box which talk to each other and the user is provided a web link to use (multi tenant setup isnt in the pipeline at this point). Currently we pay a one of monthly cost to the VPS provider and that covers everything.  Now moving to azure when we are looking at more of pay for what we use setup this changes the game a bit. What im wanting to do is to add a test company to the azure setup (we have a proof of concept copy in azure now) and simulate a days usage through it and than want to check the costs that it racks up on our account. Than create another test company and simulate a days usage and see what costs come from that. I was thinking once we've got so many test companies on the box we could than check the costs and average out that across the amount of companies and give us an estimate of how much an average company will cost us per day. Let me know if I'm being silly at this point? I would think this kind of cost forecasting would be pretty common.  The problem is that the only thing we seem to be able to do is check our account every morning and see what the cost was for the previous day, it seems very difficult if not impossible to drill down more costs. We can see each thing that we use on our account page (storage, cpu, input output) but it's hard to tie these back to actual daily costs.  Can anybody give advice on achieving what we are looking for?
272
This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?
72822
NOTE The audience of programmers.se and dba.se is different, and will have different viewpoints, so in this instance I think it's valid to duplicate  on programmers.se.  I couldn't find discussion on dba on this already, and the original post says it all, so:     Most software developers want to keep   application logic in the application   layer, and it probably feels natural   for us to keep it here. Database   developers seem to want to put   application logic in the database   layer, as triggers and stored   procedures.      Personally I would prefer to keep as   much as possible in the application   layer to make it easier to debug and   keep the responsibilities of the   layers separate.      What are your thoughts on this, and   what should or should not be ok to   implement in the database layer?   N.B. I'm not the OP for that question, but left the original wording intact.
10493
Do you know a good source to learn how to design SQL solutions?  Beyond the basic language syntax, I'm looking for something to help me understand:   What tables to build and how to link them How to design for different scales (small client APP to a huge distributed website) How to write effective / efficient  / elegant SQL queries
96704
I'd like to move all my media files to a CDN (Windows Azure is my best choice for now).   Two questions :   How can I avoid SEO and redirections issues for the previously uploaded media files ? For the next media files I'll upload, isn't using a CDN bad for SEO and search engine ranking ?
115552
I have a small website and have a free (shared) web hosting package but I have recently created a node.js app and I want to purchase a cheap vps with a different web host for it. The vps plan has limited storage so I will still be dependent on the shared hosting plan.  It it even possible to do this? Let's say I have mywebsite.com using shared hosting and I want to host the specific page mywebsite.com/nodeapp on another web host with which I have purchased the vps. I can't seem to find this info anywhere and I would like to know before purchasing the vps. Thanks in advance for your answers.
79652
There are a ton of sites out there to help book hotel rooms and to aggregate all the different sites to book hotel rooms. These companies make enough money to buy ads on TV, so I won't name them here. I normally poke around 3 or 4 of these as part of planning any trip.  I am now starting some very long term planning for a 6 week South Pacific trip, which includes undertstanding what hotels costs on some very small islands. I have paper guidebooks and I've been looking online. But I come across anomalies. For example, a place which has only 9 hotels listed on the sites I use, and prices range from $1000/night down to $200/night, then when I read the reviews on that cheapest one people are saying "it's nothing special, there are 5 or 6 places just like it here for half the price". Well, not on this site there aren't!  My guess is that many of these places don't have web sites, or don't have online booking, and therefore aren't getting into the aggregators. For some islands I have found local tourism boards with lists of "pensions" and such, typically cheaper than what I can find on the aggregators.    But how can I know? I don't want to assume that popular web sites represent reality, and choose only from places listed there. But I don't want to invest 10-20 hours of research per island only to discover the aggregators had everything. How can I know where the coverage is good and where it isn't, what kinds of hotels are more or less likely to be listed at expedia, trivago, booking, hotels, tripadvisor, and the like? (For example, I don't want to stay at a hostel, so I don't mind if they're not included in online sites.) Are there sites like wikitravel that list places without much of an internet presence?  I'm starting my research over a year before the trip, but wading through hotel pages is not the fun part of the planning so tell me how the smart people do it.
97686
I'm running some Microsoft SQL Server 2014 load testing on a decently spec'ed machine. I'm certainly not an expert on the SQL Server tuning specifics, but with the bits an pieces I've gathered from various places I think the setup is quite OK.  One element in the performance does puzzle, hence I'm reaching out here. The database that I'm testing against was built up historically and was originally created against 2008r2. The compatibility setting was carried over from that version. I've raised that setting last week in two stages, but when I raised it from 2012 to 2014 compatibility, all of sudden the CPU load went through the roof.  When changing this setting back an forth it seems to be systemic. I can run X simulated users (web app in front of the DB) on an 8 core database with the 2012 setting. If I raise it to 2014 I only get away with 60% of X simulated users. And the other way around for X users the batch requests number is 40% lower for the 2014 setting.  As I understand, switching compatibility level back doesn't revert the DB but only turns off features. This situation seems to point to a feature that eats CPU with no apparent gain, so I was wondering which feature that could be and if there's a way to turn of that specific feature separately?  Other posts on serverfault have pointed towards rebuilding the indexes after an upgrade, I've done so, but that doesn't really seem to make a difference.  It's probably important to note that the application at hand generates a lot of queries that are not prepared statements. This is probably leading to the high number of compilations I see in perfmon (compilations/batch requests : 0.25). I can't do too much about that, so telling me to do something about that first won't really help me forward.
68136
I run a guest ubuntu 12.04 on a host ubuntu 12.04, with VirtualBox, and the guest is much, much slower than the host (ALT+TAB takes 4-5 secs). I had a look around and I found contradicting opinions on VirtualBox versus VMware (free); so I thought to keep the former.   Both systems are updated, I installed the additions on the guest and I evenly split memory and video memory (64MB) between guest and host. I am running a Toshiba m200 laptop with 4GB ram and shared video memory. The host bios does not include a configuration option for machine virtualization. I have 2 cpus and I can't give them both to the virtual machine.  Is there anything I overlooked that could solve my problem?  Feel free to ask for more info, and thank you for any help.  EDIT Idling with the system monitor open the (single) guest cpu never gets below 55% and could rise to 80 - 90% just by moving the mouse around. Opening Firefox will cause the system monitor to show cpu usage 100% in the guest, while the host shows that both cpus are evenly working around 60%.  My cpu is Intel® Core™2 Duo CPU T5450 @ 1.66GHz × 2.  If this is not a configuration problem, does it mean my machine is too weak for virtualization?
72530
Is there a way to determine in advance how much disk space a VACUUM FULL on a particular table would return to the OS? Therefore you can decide whether it's worth the cost in doing so. Bonus if there's a simple query to do this for every table in a database/server (rather than doing each one separately).
21226
I've noticed an odd behavior on a 2-server HA cluster and I was hoping someone could confirm my suspicion, or maybe offer some other explanation... Here is my setup:   A 2-server SQL 2012 SP1 installation SQL AlwaysOn HA has been enabled for a few databases CPUs are 2.4GHz, 4 cores RAM is 34 GB (it is an AWS instance, hence the odd number) Resource utilization is relatively low - each server has 14+ GB memory free, and SQL is not capped on how much memory to use Disk access time is fine - rarely going over 15ms/Read or Write Databases are not big - 1 GB, 1.5 GB, 7.5 GB SQL server process is using 16 GB Private Bytes, 15 GB Working Set   Overall, no resource issues are noted. Now for the odd part. SQL is not restarted (process has been running for almost 6 months) but it seems that every ~50 days, the Page Life Expectancy counter drops to (almost) 0. Up until that point it climbs steadily, no drops. Here is a perf graph:    When I look at the counter data (I don't have the exact number, just an hourly aggregation) it seems the PLE counter value reached about 4,295,000 sec (roughly 50 days) every time (at least every time I have data for).   My crazy theory is that the PLE number is held as milliseconds as an unsigned long int (which has a limit of 4,294,967,295) and at 49.71 days it resets, either by design, or because of a bug. This would explain the behavior of the two servers and the identical pattern they have. Or it could be something totally different and I am just not making any sense. :)  Has anyone seen anything like that, or can explain this behavior?  P.S. I saw  post, but my case seems slightly different.  P.P.S. This is a repost - I originally posted it , but was advised the audience here is more appropriate.  Thanks!
359
I'm trying to come up with a sane way to understand if the max server memory (mb) setting is appropriate (either should be lower, or higher, or stay the way it is).  I am aware that max server memory (mb) should always be low enough to leave room for the operating system itself, etc.    The environment I'm looking at has several hundred servers; I need a reliable formula I can use to determine if the present size of the buffer pool is appropriate since RAM is costed per GB allocated to each server.  The entire environment is virtualized, and "physical" RAM allocated to a VM can easily be changed up or down.  I have a particular SQL Server Instance I'm looking at now with a PLE of 1,100,052 seconds, which equates to 12.7 days (the amount of time the server has been up).  The server has a max server memory setting of 2560MB (2.5GB), of which only 1380MB (1.3GB) is actually committed.    I've read several items including one by Jonathan Keheyias () and another by Paul Randal (), and several others.  Jonathan advocates monitoring for a PLE below 300 per 4GB of buffer pool as being too low.  For the SQL Server Instance above, 300 * (2.5 / 4) = 187 results in a really really low target PLE below 300.  This instance has 290GB of SQL Server data (not including log files), and is only used for integration testing.  Assuming the last 12 days is representative of typical usage for this server, I'd say the max server memory (mb) setting could be lowered.  At the other end of the scale, I have another integration-test server with a PLE of 294, that has a max server memory (mb) setting of only 1GB.  This server has only 224MB of SQL Server data not including logs, and is running some BizFlow databases.  This server might benefit from a higher max server memory (mb) setting.  I'm thinking a good starting place for targets that might be assigned too much memory could include looking at:  SELECT      RamMB = physical_memory_in_bytes / 1048576     , BufferPoolCommittedMB = bpool_committed * 8192E0 / 1048576     , BufferPoolCommitTargetMB = bpool_commit_target * 8192E0 / 1048576     , PercentOfDesiredSizeMB = CONVERT(INT,(CONVERT(DECIMAL(18,2),bpool_committed)                              / bpool_commit_target) * 100) FROM sys.dm_os_sys_info;   If BufferPoolCommitTargetMB / BufferPoolCommittedMB is greater than 1, the server is not using the entire buffer pool.  If the machine in question also has a PLE of greater than "x" then it might be a good candidate for a decrease in max server memory (mb).  Since the Buffer Manager:Lazy writes/sec performance counter tracks the number of times SQLOS has written pages out to disk between checkpoints due to memory pressure, this might be another good thing to look at.  DECLARE @WaitTime DATETIME; SET @WaitTime = '00:00:15'; DECLARE @NumSeconds INT; SET @NumSeconds = DATEDIFF(SECOND, 0, @WaitTime); DECLARE @LazyWrites1 BIGINT; DECLARE @LazyWrites2 BIGINT;  SELECT @LazyWrites1 = cntr_value  FROM sys.dm_os_performance_counters dopc WHERE (         dopc.counter_name LIKE 'Lazy writes/sec%' COLLATE SQL_Latin1_General_CP1_CI_AS     )     AND dopc.object_name = 'MSSQL$' + CONVERT(VARCHAR(255),                SERVERPROPERTY('InstanceName')) + ':Buffer Manager';  WAITFOR DELAY @WaitTime;  SELECT @LazyWrites2 = cntr_value  FROM sys.dm_os_performance_counters dopc WHERE (         dopc.counter_name LIKE 'Lazy writes/sec%' COLLATE SQL_Latin1_General_CP1_CI_AS     )     AND dopc.object_name = 'MSSQL$' + CONVERT(VARCHAR(255),                SERVERPROPERTY('InstanceName')) + ':Buffer Manager';  SELECT LazyWritesPerSecond = (@LazyWrites2 - @LazyWrites1) / @NumSeconds;   The above code assumes the server is under load during the 15 seconds it takes to run, otherwise it will report 0; which might be a misleading false-negative.  Should I also look at PAGELATCHIO_* wait stats or some other wait type as an indicator of memory pressure, or lack thereof?   My question is, how can I reliably determine a "good" target value for PLE and max server memory (mb)?
54050
We have a SQL server hosted on an Azure VM.  One of our applications is very read\write intensive on the database and we're seeing poor disk performance.  Disk queue lengths of 10 or greater.   I've been trying to find a way to increase disk performance.  I found a technet video  that mentions a disk quota and spanning 4 storage accounts increases disk i/o.  Can anyone confirm this disk limiter or recommend this spanning technique?
18488
Currently I have a web app running where I have 9 VPS servers connected to a Load Balancer. As my web app has been getting traffic, I've been purchasing new VPSs to handle the load. Managing so many of them is pretty annoying and I don't really have time to learn Puppet/Chef.   I am wondering, would I get more output if I purchase say 2 high end dedicated servers assuming that my Ubuntu/Apache config would be cloned over to them? Is there any way to estimate the gains/loses in hit/sec that I would get? Right now most of my VPSs are 8GB ram with low CPU priority.   This is my level of volume right now:   Often times I have spikes of up to 2k/sec. My VPS system seems to cap at around ~850/sec.  Would going dedicated by the next logical step?
12158
As I found solutions on making site-to-site VPN between Azure and AWS using a software VPN server, I'm asking myself if it's possible to connect the VPN gateways (Azure VNET / AWS VPC) directly.  Is there a limitation that forbids it ?
4986
Using a web service is often an excellent architectural approach. And, with the advent of WCF in .Net, it's getting even better.  But, in my experience, some people seem to think that web services should always be used in the data access layer for calls to the database. I don't think that web services are the universal solution.  I am thinking of smaller intranet applications with a few dozen users. The web app and its web service are deployed to one web server, not a web farm. There isn't going to be another web app in the future that can use this particular web service. It seems to me that the cost of calling the web service unnecessarily increases the burden on the web server. There is a performance hit to inter-process calls. Maintaining and debugging the code for the web app and the web service is more complicated. So is deployment. I just don't see the advantages of using a web service here.  One could test this by creating two versions of the web app, with and without the web service, and do stress testing, but I haven't done it.  Do you have an opinion on using web services for small-scale web app's? Any other occasions when web services are not a good architectural choice?
72999
I have an InnoDB database that I'd like to migrate onto Amazon RDS.  My current implementation, hosted on my own server, shows roughly 8M queries per month.   say that  I/O Rate    $0.10 per 1 million requests  Does 1 I/O = 1 query?  ie, will I be billed $80/mo for this amount of usage + the RDS fees?
53759
I have been living under a rock for the past 5 - 8 years, and am just now getting up to speed with virtualization, virtual machines and platforms like VMware or VirtualBox.  I think I am starting to get them, but there are two concepts about VMs that I'm just choking on for some reason; one has to do with their intrinsic benefit to the enterprise, and the other has to do with their practicality when being used.  So I understand that you can have multiple VMs running on the same physical machine, all doing their own "thing" as if they were separate machines. So let's say I want to make a nice little virtual network of servers in my home office so I can have a big sandbox to play inside of for all my projects. I set up 2 physical machines as servers, and on each of them I have, say, 4 virtual machines running (1 might be an app server, another might be a RDBMS, another might be a message broker, etc.).   Besides saving me money (as I only have to provide 2 physical machines instead of buying 8 servers), what instrinsic benefit/purpose do these VMs serve here? I don't care how clever virtual machines are, if my computer only has 8GB of RAM, and I have 4 VMs running on it, those VMs only get 8GB of RAM to share between them. Putting 4 VMs on my server doesn't endow it with 4 times that amount of RAM! So, as far as I see it, VMs save you money on hardware, but just end up bogging down that hardware as you have multiple machines competing over the same pool of resources. What am I missing here? Can VMs communicate with each other over your network using high-level protocols like TCP/IP, HTTP, FTP, etc.? Otherwise, it just doesn't make sense to implement all these VMs if you have to feed them separate and independent chunks of data/requests to process.