Friday, January 28, 2011

Mercurial Web Server

Is there a Mercurial equivalent to VisualSVN Server? I want to setup an http web server for a mercurial repository that has nested repositories. Using the docs it's very difficult to get what I want.

Best way to improve disk performance (SQL Server 2000)

I am having some disk access issues on a web application.

The main load is many concurrent inserts/updates/selects on large tables.

It is currently a single 2ru rackmount running SQL Server 2000 and IIS, running a raid5 with 4x15k SAS for the DB; and 6GB of ram/8 physical cores. CPU and memory usages seem fine.

Things i'm considering....

  • move from our current Raid to a many disk SAN
  • Ram Drive for tempdb files
  • Cluster the server
  • Upgrade SQL-Server (Will happen eventually regardless; but handy new keywords should help much at the very least)
  • ?

Anything I should be looking at/considering?

Thanks, Chris

  • The immediate thing that leaps to mind is to look into converting that RAID5 to a RAID10 or a pair of RAID1's.

    From Hutch
  • Move your data and logs to a FusionIO drive, very very expensive but as far as I'm aware you can't get faster persistent storage right now.

    Oh and you should move to 2008R2 64-bit too of course, plus load up on memory.

    From Chopper3
  • Couple of things. First off, clustering the server won't give you any performance benefit, only increase in availability.

    Probably the easiest thing you can do to relieve disk I/O is to increase the memory on your server. As more of your data pages are stored in RAM, the less physical I/O that needs to happen for queries to run.

    Depending on your workload, if you can afford to move to a SAN, then you will probably want to look at splitting up your TempDB, logs, and data files onto seperate physical disks (you may want to look at this MS article around storage top 10 best practices for SQL Server: http://technet.microsoft.com/en-us/library/cc966534.aspx). As Hutch stated, move off of RAID 5, especially for logs and TempDB, has these have high amounts of writes (RAID 5 has a write penalty for the parity).

    As Chopper3 says, FusionIO drives are some of the fastest drives around currently. If you have the budget for them, that is definitely one area to explore (especially for your TempDBs).

    HTH, Dan

    3 D : Since this is SQL Server 2000, is this Enterprise or Standard edition? Also is this 32 bit?
    wom : 64bit Enterprise I believe.
    wom : Currently; we sit ~20% memory usage at any given moment; is there a benefit from growing this greaty? The barometer I am using to determine if I am disk bound is the average QUEUE length; which spikes above 100 when some of my high load operations kick off...
    3 D : awesome. You might want to check a couple of Perfmon counters. "Physical Disk" >> "Avg. Disk sec/Read" should be less than 8ms. Also "SQLServer:Buffer Manager" >> "Page Life Expectancy" should be over 300. If either of these are off, then adding memory to your sever will be you quickest, easiest, and probably quickest way to relieve disk pressure.
    3 D : if you are at 20% memory usage, then you might want to check out your SQL Server properties and make sure that they are configured properly to use as much memory as possible (without affecting IIS, the OS, etc).
    From 3 D
  • This is a huge topic, but I might be able to offer some tips to help you get started. In general I think it is safe you say that you will need to gather more precise information before you can decide how to best attack your problem. In the end it will probably come down to a memory issue or a disk issue.

    (I'll ignore the possibility of looking at the queries that are running slowly and attempting to find out if there are ways to improve them. This is a huge topic, but using the query analyzer can help you to determine if you are missing an index or of a query should be completely rewritten.)

    I would start out by using the Performance Administrative Tool to look at a few key metrics. The SQL Server performance counters are a good place to look. Disk queue stats can also be very telling. Are applications (i.e. SQL Server) waiting on disk I/O to perform operations? If so, then you know that you will need to upgrade the disks (or fix the queries, possibly). @Hutch is correct that RAID 10 will offer better performance than RAID 5 for a database server, but really that is only going to come into play if you're waiting on writes. 4 15k RPM drives in a RAID 5 should be able to handle quite a reasonable load with a decent RAID card (of course what's reasonable and/or decent is relative).

    I would also check the memory. The server is running SQL Server 2000 so I will assume it's a 32-bit server OS. Is SQL server actually able to use all that memory? On a 32-bit system you'll need to use PAE to use all 6 GB, and even then I believe the SQL server process itself will only be able to grow to 4 GB. You can use a program like the sysinternals process explorer to look at how much memory is actually being used. You can even view how much memory SQL Server "wants" -- check out the SQL Server: Memory Manager counters (if they are available on 2000, can't remember off the top of my head).

    You also mention that the server is running IIS. If you're running MS SQL Server on a server that's also running other heavily loaded services, you may want to look into manually configuring how much memory should be used. By default SQL Server assumes its on a dedicated server and tries to dynamically allocate as much memory as possible; depending on the needs of your IIS processes this may not be a good thing. On servers running multiple applications I usually like to configure SQL Server to use exactly a certain amount of RAM by setting the minimum and maximum to the same value (e.g. 4GB, 10GB, whatever).

    Finally, you might consider upgrading SQL Server. SQL Server 2005 introduced some big speed enhancements in certain areas that might benefit you depending on your setup. Not to mention the fact that you can obtain a 64-bit version of SQL Server 2005/2008 and run it on a 64-bit OS to give it even more memory, and memory is by far one of the most important things for a SQL server.

    From Deutsch
  • This topic needs a huge "It Depends" for the answer. While the answers posted so far are good and correct for given conditions, there is so much more.

    Yes, moving off of RAID-5 to RAID-10 is a huge check-mark in the "Do this now" column, but what about the pieces we have not been told?

    Thinking about this, I come up with the following items: Disk layout:
    What files are on what drives? Where is the TempDb and how many files are associated with TempDb Are the DB's and T-Logs on different drives?

    Query management and optimization:
    Have the heaviest queries been identified and optimized? How? Are the Updates causing row relocations or are they able to "Update in-place"? Row relocations during an update cause all sorts of performance issues. Index management: Are the needed indexes in place and are they correctly defined in order to be utilized by the queries which need them? Index rebuilds: Indexes become fragmented over time and need to be reorganized or rebuilt. Not doing this will affect performance.

    Environment: Drive fragmentation can lead to file fragmentation. Even when the drive is kept clean, a large number of extents for any DB or T-Log file has a negative effect. Upgrading from SQL 2000 to SQL 2005 or (better yet) 2008 or 2008 R2 is a great suggestion. Running on Windows Server 2008 x64 or Windows Server 2008 R2 x64 complements the 6GB of memory in natively. SQL Server 2008 and 2008 R2 have built-in tools for helping to identify problem queries. In a stressed environment with a stressed DBA, this is worth the upgrade. Drive Controller Cache Memory: Is it sufficient? Is the cache shared between multiple logical drives?

    Resource competition (pressure):
    Besides IIS, what other processes on the SQL Server system are competing for the system's resources?

    Adding a SAN is not a bad idea, but you need to understand the environment. Knowing if the cause of your performance speed-bumps is due to table-scans, improper foreign-key management, row-relocation during update, some other issue, or "all of the above" is very important. Without knowing the underlying cause(s) means the addition of a SAN will only be a temporary boon. Also, knowing your environment is mandatory for the proper sizing of a SAN -- It is not only about the availabe dise-space.

    I do not know your environment and could not give a reasonable answer as to what you should do; also my above list is really the tip of a topic to which many thoughtful books have been dedicated.

(200 ok) ACCEPTED - Is this a hacking attempt?

I assume this is some type of hacking attempt. I've try to Google it but all I get are sites that look like they have been exploited already.

I'm seeing requests to one of my pages that looks like this.

/listMessages.asp?page=8&catid=5+%28200+ok%29+ACCEPTED

The '(200 ok) ACCEPTED' is what is odd. But it does not appear to do anything.

I'm running on IIS 5 and ASP 3.0. Is this "hack" meant for some other type of web server?

Edit:

Normal requests look like:

/listMessages.asp?page=8&catid=5
    1. May be the log is wrong. It looks like some part of answer inside URL. If it appears in IIS logs, try to watch the request URL using packet sniffer to ensure it is really such.
    2. May be some script gets malformed URL, e.g. it may be bug in your ASP site.

    In general it may look like either highly specific or specially crafted crack attempt that is made to look like a bug, but I suppose it is not. You should also analyse previous and further requests from this user. If it is sometimes occur from different places with no other suspicious things, it is a bug, not crack attempts.

    From Vi
  • Are all the requests coming from one IP range? Have you tried running a packet capture to see what the full request headers look like?

    Byran : All different IPs. I can see the form & query string values they enter but I have not done any packet capturing. Thanks for the suggestion.
    From Josh
  • Short answer, it may be. But given the information you give us I would say no. More logs could change the answer.

    From tore-
  • I'm getting the same kind of request on a site running classic ASP on IIS 7. The IP addresses I'm tracing all originate with spammers. I also have no idea what they are trying to do, and it does not affect the site adversely other than to annoy us with 404 errors.

    As for 200 OK Accepted, it's an HTTP status code: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

    From C K
  • I don't have sufficient privileges to comment, but I get this as well, with the browser string:

    User agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Alexa Toolbar; (R1 1.5))
    IP address: 94.45.33.18
    

    This is against an Apache server. I don't think it's an attack as it's too infrequent and it wouldn't cause a problem on any HTTP server I can think of, except throw 404 errors.

  • Only worthwhile result on Google is this, so ...

    Just had this show up on an IIS 6 (Server 2003) site I manage. In this particular case, hitting a ColdFusion page (basic template file which is used across the site, including the home page), and just tacking it on to the end of the URI stem (no query string).

    Same request, coming from a number of different IPs, with the following user-agent common amongst them:

    Mozilla/3.0 (x86 [en] Windows NT 5.1; Sun)
    

    No referrer information passed. 21 requests over 2 minutes, with a little over half a dozen unique IPs. Countries returned for IP include US, Bosnia, Malaysia, etcetera.

Change version of ruby does not work on CentOS

I'm trying to change version of the running ruby on a CentOs machine.

-# rvm use ruby-1.9.1-p378
-# ruby -v
-# ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]

It is installed (by rvm) and I get no complains when I try to use that version, whereas I get complains when trying to use another version.

Anyone got any ideas on how to get this working? I'm essentially trying to install rails on top of this and I get a too-old-version complaint if I'm trying to install on 1.8.6.

Thanks for any input..

  • There probably won't be an answer for this question since it magically worked when I logged on the next day...

    From Phil

XAMPP/Apache - SSL Not working

Hi,

I have recently created a SSL using the makecert.bat and its all stored and created in the correct directory.

The SSL is not appearing on my site, this is located on a VPS. I think its something to do with my Apache config on the VirtualHost. It's all ran on Windows 2003 server.

Here is my VirtualHost (C:\xampp\apache\conf\extra\httpd-vhosts.conf)

#

Virtual Hosts

#

If you want to maintain multiple domains/hostnames on your

machine you can setup VirtualHost containers for them. Most

configurations

use only name-based virtual hosts so the server doesn't need to worry about

IP addresses. This is indicated by the asterisks in the directives below.

#

Please see the documentation at

for further details before you try to setup virtual hosts.

#

You may use the command line option '-S' to verify your virtual host

configuration.

#

Use name-based virtual hosting.

#

NameVirtualHost *:80

#

VirtualHost example:

Almost any Apache directive may go into a VirtualHost container.

The first VirtualHost section is used for all requests that do not

match a ServerName or ServerAlias in any block.

#

##ServerAdmin postmaster@dummy-host.localhost
##DocumentRoot "C:/xampp/htdocs/dummy-host.localhost"
##ServerName dummy-host.localhost
##ServerAlias www.dummy-host.localhost
##ErrorLog "logs/dummy-host.localhost-error.log"
##CustomLog "logs/dummy-host.localhost-access.log"

combined

##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot "C:/xampp/htdocs/dummy-host2.localhost"
##ServerName dummy-host2.localhost
##ServerAlias www.dummy-host2.localhost
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log"

combined

I have tried doing config's to it but no luck, it crashes and Apache wont start if I do my port "443" changes.

  • #

    Remove ## from config!

    Raymond : That still wont solve the SSL problem.
    From rychu

Task Scheduler offers download of .asp script instead of running it

I scheduled this action on Task Manager on Server 2008:

Start a program C:\Program Files\Internet Explorer\iexplore.exe" "D:\Inetpub\pathToMy\script.asp"

When the task runs, IE opens quickly and closes, leaving behind a "Do you want to open or save this file? script.asp"

How can I run this classic ASP script?

What are the alternatives to MozyPro for server-level file system off site backups?

Due to problems with getting support, we are currently looking to move away from using MozyPro to backup our Windows servers (150 GB~ of file shares and various development tools for our team of programmers).

We use MozyPro specifically for off-site backups. We have an additional on-site backup solution in place, that is run entirely local.

We are looking for good alternatives to using MozyPro for off-site backup, considering:

  • We have plenty of upload bandwidth
  • We need to backup about 175 GB of data
  • It needs to have a client for Windows server 2003/8
  • Disclaimer : I work for Iron Mountain, and my opinions expressed here are my own. I don't work for the Iron Mountain Digital, the division that makes these products.

    We have a product called LiveVault that does online server backup. If you're running backup software from our partners (I'm aware of MS DPM and Commvault), you can also do your existing backups to our cloud without replacing/adding to your existing software. That's two potential solutions.

    From mfinni
  • Disclaimer: I work for Rackspace, a partner of Iron Mountain (hello @mfinni!). However, I was a customer long before I became an employee, and I don't work for the part of the business that makes our backup product.

    We offer a product called JungleDisk Server Edition that does server backup to Rackspace Cloud Files or S3. Prices are $5 per server per month for the software license and $0.15 per GB per month for storage. First 10GB are free on each server and there are no data transfer charges for Cloud Files.

    This is for file-level backup, not system state. It doesn't have quite as many features as a LiveVault-type service but is much cheaper.

    From phoebus