dekoder

absolutely everything works

Configuring Windows for high network connection rates

leave a comment »

When a TCP/IP socket is closed, it goes into TIME_WAIT state before closing, for a period of time determined by the operating system. A socket in TIME_WAIT state cannot be reused; this can limit the maximum rate at which network connections can be created and disconnected.

The client application normally closes the socket; if the application is on a different machine, the limitation usually applies to the machine running the application. The symptoms of a machine that is reaching these limits include:

All of the TCP/IP resources of the operating system are in use, and requests for new connections fail. Running the netstat -a command on the application machine shows a large number of sockets in TIME_WAIT state.
Performance deteriorates.

To improve the ability of the Windows operating system to deal with a high rate of network connections, add the following registry entries in

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters

TcpTimedWaitDelay
A DWORD value, in the range 30-300, that determines the time in seconds that elapses before TCP can release a closed connection and reuse its resources. Set this to a low value to reduce the amount of time that sockets stay in TIME_WAIT.

MaxUserPort
A DWORD value that determines the highest port number that TCP can assign when an application requests an available user port. Set this to a high value to increase the total number of sockets that can be connected to the port.

For example, a system making a large number of connection requests might perform better if TcpTimedWaitDelay is set to 30 seconds, and MaxUserPort is set to 32678

Written by dekoder

23 November 2010 at 17:19

Posted in networking

Replay traffic with httperf

leave a comment »

If you need to replay your live traffic on a web server, here’s how to do it using httperf:

First you need to prepare your webserver log file, which means removing all unwanted stuff like javascript, images, css etc.

Then extract the URLs from log file with e.g. awk:

awk '{print $7}' access.log > requests.log

Translate into httperf format (requests must be separated by ASCII NUL):

tr "\n" "\0" < requests.log > httperf_wlog

Finally, feed it into httperf:

httperf --server 1.2.3.4 --wlog=B,httperf_wlog

If parameter B is set to ‘‘y’’, httperf will wrap around to the beginning of the file when reaching the end of the list (so the list of URIs is accessed repeatedly). With B set to ‘‘n’’, the test will stop no later than when reaching the end of the URI list.

Written by dekoder

23 November 2010 at 15:45

Posted in web server

Taking screenshots and recording screencasts on Android phone

leave a comment »

No need to root your phone.

Setting up your phone

Download and install Android SDK on your PC.

Connect your phone in USB debugging mode and make sure your phone is detected properly by

sdk/tools/adb devices

Taking screenshots

Run

sdk/tools/dbms

Once it starts, select your phone and press CTRL+S or goto menu Device > Screen Capture

Recording screencasts

Make sure you have Java Runtime Environnement 5 or later installed

Run androidscreencast from google code project

Written by dekoder

20 November 2010 at 12:34

Posted in android, Howto

Browser choice

leave a comment »

I took these screenshots when updating a freshly installed Windows XP SP3.

First, I was presented with browser choice:

choose browser

I was able to choose Firefox:

download firefox

After that, i decided to install Firefox manually.

Written by dekoder

1 March 2010 at 23:19

Posted in Misc

Fixing Eclipse in Ubuntu 9.10 Karmic Koala

leave a comment »

The fix is relatively simple. Create a file in your home folder (or wherever you want) called eclipsefix.sh – open it and add the following lines:

export GDK_NATIVE_WINDOWS=true
/opt/eclipse/eclipse

(where /opt/eclipse/eclipse is the location of your eclipse application file).

Make sure you make it executable (chmod +x ~/eclipsefix.sh) then go to whatever shortcut you usually use to open Eclipse and change the command to point towards the file you just created (ie,/home/mou/eclipsefix.sh).

Now whenever you open Eclipse using this shortcut, the script will run and eclipse should work as expected.

According to the eclipse bug tracker, this issue should be fixed in Eclipse 3.5.2

Written by dekoder

10 January 2010 at 02:04

Posted in Ubuntu

Compile MonoDevelop 2.2 from SVN in Ubuntu 9.10

with 2 comments

sudo aptitude remove monodevelop
sudo apt-get build-dep monodevelop
sudo aptitude install subversion gnome-sharp2 libmono-microsoft-build2.0-cil
svn co svn://anonsvn.mono-project.com/source/trunk/monodevelop monodevelop-svn
cd monodevelop-svn
./configure --profile=core
make
sudo make install

Written by dekoder

6 January 2010 at 17:41

Posted in Howto, Ubuntu

Tagged with ,

Access Denied on some files in XP shared folder

leave a comment »

Sometimes you add new files or folders to a shared directory in Windows XP and they cannot be opened. You have to refresh permissions inside your shared folder, like this:

CACLS C:\MySharedFolder\*.* /T /e /g Everyone:c

Written by dekoder

23 August 2009 at 17:52

Posted in Howto

Tagged with

Controlling VMware Server services

leave a comment »

Setting startup of services to manual

The solution is as simple as it is evident – in other words simply stopping the services from loading automatically at system boot while still making it possible to use VMware Server without having to manually start all services in the expected order.

What we’re going to do to start with is to set all of the relevant services startup to manual, and this is easily done by first clicking on the Start-button followed by using the “Run…”-option to run the command “services.msc”. You should now get an overview over all system services, and you can set each of the services startup-mode to manual by first right-clicking each service and selecting properties followed by the actual adjustments.

    Easily starting and stopping the services

    In order to use VMware Server you would now ordinarily have to go back to the tool previously used, “services.msc”, and starting the services manually, but that frankly seems to be a little too much work to bother with so we’re going to make a couple of batch-files to do this for us. The following two sections detail the contents of these files, and in case you’re wondering you can simply copy the content and paste them in a text-editor such as Notepad and then saving them with an appropriate name. Using them is simply done by double-clicking on them and letting the computer do the rest.

    Contents of “VMware start.bat”:

    @echo off
    echo --- Starting VMware Server services
    net start "VMware Authorization Service"
    net start "VMware Registration Service"
    net start "VMware DHCP Service"
    net start "VMware NAT Service"
    net start "VMware Virtual Mount Manager Extended"

    Contents of “VMware stop.bat”

    @echo off
    echo --- Stopping VMware Server services
    net stop "VMware Registration Service"
    net stop "VMware Authorization Service"
    net stop "VMware DHCP Service"
    net stop "VMware NAT Service"
    net stop "VMware Virtual Mount Manager Extended"

    Written by dekoder

    6 June 2009 at 20:54

    Posted in Howto

    Tagged with ,

    Windows XP SP3 update problems

    leave a comment »

    After updating to SP3 Windows refused to install any update. This helped: put the following into fix.bat and run it:

    net stop wuauserv
    regsvr32 wuapi.dll
    regsvr32 wuaueng.dll
    regsvr32 wuaueng1.dll
    regsvr32 wucltui.dll
    regsvr32 wups.dll
    regsvr32 wups2.dll
    regsvr32 wuweb.dll
    net start wuauserv

    Written by dekoder

    1 August 2008 at 23:26

    Posted in Howto

    Tagged with , ,

    Enumerate the bindings listed in WCF configuration

    leave a comment »

    Is there an easy way to enumerate the bindings listed in configuration?
    How do I enumerate the available bindings?
    How do I enumerate all of the bindings exposed in config and their underlying runtime binding type?
    etc., etc.

    Read here

    Written by dekoder

    11 July 2008 at 08:29

    Posted in .NET

    Tagged with ,

    Follow

    Get every new post delivered to your Inbox.