Building a computer Hardware Slovenia

Building an Intel Core i7 based computer – CPU

What to look for in a CPU? For me, I look for a good performance before anything else, yet it shouldn’t be too expensive. You have always watch for a performance bottleneck in a computer – it doesn’t help to have a fastest CPU on the world if other components are slower. In other words, I am looking for a sweet spot. I look for a technology that will last for few years.  I’d like to see a solution with a passive heat sink but those don’t exist anymore even for a relatively slow CPUs.

First step is to pick a manufacturer. It is either Intel or AMD. I’ve been a fan of AMD (before Intel come out with Core 2 line of processors) as AMD Athlons at the time were more advanced, faster and they run much cooler (passive heat sinks were an option then) than Intel’s Pentiums. Unfortunately for AMD, due to problem in their manufacturing of newer CPUs,  this is no more true. Intel wiped out the competition first with Core 2 and now with Core i7. So, Intel is my choice.

I will chose between two Intel’s models: Core 2 and Core i7.

Core 2

  • is cheaper
  • uses cheaper DDR2 or more expensive DDR3 RAM
  • motherboards are cheaper
  • plenty of different motherboard chipsets
  • 2 or 4 cores
  • might consume less power (TDP), depends on a model (ranges from 65W to 150W)
  • 65nm (older) to 45nm (newer)

Core i7

  • more expensive
  • it uses more expensive DDR3 RAM only
  • motherboards are more expensive
  • there is only one chipset – X58
  • 4 cores only
  • consumes more power than slower Core 2  but less than the top Core 2 (130W)
  • faster than Core 2
  • 45nm technology

If I want a system that will last for some time then I should stick with a faster and newer Core i7 platform and DDR3 memory. Furthermore the slowest Core i7 920 is more or less faster than the fastest Core 2 model even though it runs on a slower frequency (at least judging from the online reviews) and it comes at lower price. There are various technology improvements for Core i7 line as well.

One can’t pick between 2 or 4 cores when it comes to Core i7. It might surprise you but having less cores at same performance rating is better. The reason: multi core CPUs exist only because manufacturers can’t raise the CPU frequency easily and it is more convenient (cheaper) for them to stuff more cores at lower frequencies into the CPU. IOW a single core CPU operating at 3GHz is a better choice than a dual core operating at 1.5GHz performance wise. The multi core technology has other side effects such as forcing developers to program for multi core CPUs which means somewhat more demanding development. Due to manufactures and physics laws the CPUs are heading into more and more cores stuffed on the same chip instead of the higher frequencies (as before, at the time of single cores) and we have to adapt to the situation.

The power consumption for Core i7 920 is rated at 130W max but I think it should consume less power because all three Core i7 models (920, 940 and the faster 965) have the same max. rating. So, the slower model should consume less. I am not happy with such high power consumption but this isn’t a decisive factor for me at this time, because I don’t have choice once I’ve decided for Core i7 (or better, at this performance one don’t have a choice anyway). Note, that more power consumption means more heat and more heat means more cooling which means more noise. I hope that my Sycthe Mugen 2will still run quiet nevertheless (that’s why I’ve chosen a good CPU cooler). The best way to keep down power consumption at same performance is to enhance the building process to use “smaller” technology which is 45nm for Core i7 but that’s something I can’t change.

Upgrades, such as adding more memory or changing the CPU, will be easier in the future because the Core i7 line will be mainstream (and faster) while Core 2 line will be slowly abandoned. The same goes for DDR3 vs DDR2 RAM. Just look at your DDR memory (I won’t even mention SDRAM) if you still have it – it is pretty useless except if you have very old computers.

I’ll pick the slowest of the Core i7 line: 920. The faster 940 is almost twice as expensive yet it won’t give me significant increase of speed (nor any other advantage – but it will me higher power consumption) for my daily work.

There are two SKUs on the market: a boxed version and a non-boxed version. The first comes with bundled stock CPU cooler while the other is a bit cheaper and it comes without the cooler. I’d buy the non-boxed because I don’t need the stock CPU cooler but it is almost impossible to find it (and the price difference is really a minimal one).

Here is couple of photos of the 920 and its stock CPU cooler compared to Sycthe Mugen 2(CD case is there for size comparison):

I bought an Intel Core i7 920 (boxed) at for 280 Euros .

See other relevant posts:

CPU cooler
The goal
Power Supply Unit


Building a computer Hardware Slovenia

Building an Intel Core i7 based computer – Storage

Disks fail more often than one can imagine. Because my data is the most important part of my computer my main objective is data safety so I’ll go for RAID 1 – disk mirroring that guarantees data integrity even if one of the two disks fails. Heck, I wouldn’t even miss a working day in such case – I’d just work with one disk until the damaged one gets replaced. RAID 1 is expensive because it mirrors the data – you’ll need two disks for the same data, however, the data will be redundant and furthermore RAID 1 reads data almost as twice faster than a single disk solution, write process is a bit slower compared to the single disk solution though. Another benefit of RAID 1 is possibility of using a motherboard-integrated RAID controller (which uses few CPU cycles, yet one won’t notice it on 4-core CPU) without any performance loss. RAID 5 is out of question because of really slow writes and requirements for an (expensive) add-on controller (although there are integrated controllers that handle RAID 5 but they will make it even slower). Add-on controllers have additional features such as memory cache (I’ll just use cheaper OS caching) and an option for batteries that will save the data in case of power failure (I will use an UPS to power my computer anyway – no need for those batteries).

Secondary objective is performance/price ratio. These days storage devices are the main performance bottleneck because they are relatively slow and computer often accesses them. They are even more important when you ran out of RAM (hope not, but it can happen) – then the page file swapping party begins. So the main goal is to get as good price/performance ratio as possible.

First, there are two choices: hard disk (HD) or solid state drive (SSD). I’ll pick HD option because SSDs are:

  • unproven new technology (in the long term)
  • usually slow for writing operations (they are improving though)
  • very pricey

So, I have three choices with HD technology:

  • SATA (mainstream)
  • SAS

SAS drives are very expensive, relatively small and I am not sure whether their faster speed would bring enough benefits in the performance/price sense. Furthermore they require additional SAS controller which isn’t cheap either. I think that SATA technology is far better for me. Every motherboard has an integrated SATA controller, better motherboards support RAID 1. But which drive? I’ll go for WD Velociraptors because, albeit they are more expensive, they are considerably faster than standard 7.200 RPM disks. Interestingly, Velociraptors are 2.5” disks packed in 3.5” chassis (no, they can’t be mounted in a laptop).

I bought a pair of Western Digital Velociraptor WD3000HLFS 300GB 10.000 RPM drives from for 2 x 246,79 Euros.

See other relevant posts:

CPU cooler
The goal
Power Supply Unit

Building a computer Hardware Slovenia

Building an Intel Core i7 based computer – Memory

Core i7 requires DDR3 memory. The more cheaper and slower DDR2 isn’t an option. But beware that not every DDR3 memory is good for Core i7. Oh no, they have to have a lower voltage than usual, that’s max 1.65V (1.5V recommended). Lookout for memory modules that are “build/optimized/etc. for Core i7”. Read this article to learn more about differences between DDR2 and DDR3.

Another innovation in memory access is that Core i7 is capable of using three channels to read/write from/to memory. Previous Intel and AMD CPUs could utilize only two channels at most. Thus the necessity for a triple channel modules. IOW you get the best performance by using three (or a multiplier of) physical modules. You are not constrained by the multiplier of three (the number of modules depends on motherboard as well – not every motherboard accepts many modules) but then you’ll get lower performances.

So, I’ll go for three DDR3 modules.

The final two aspects of interests to me where I can choose:

  • size
    I’ve chosen the size of 6GB (3x2GB) because I think it will be enough for my usage. Note that you shouldn’t go below your requirements (you should know how much memory on average your applications consume and what applications you are going to run at the same time) – if you run out of physical memory then your computer will start swapping memory to disk like crazy and performance will go down the drain. So, the size matters after all. No need for exaggeration though. Having more memory than required doesn’t help a lot.

    Another word of caution: 32 bit operating systems can’t use more than, at most, 3.5GB of RAM (there are ways for servers to get around this limitation but for special use). This is a hardware limitation. Which means that if you want to use more than 3.5GB of RAM you’ll have to install a 64 bit OS which doesn’t have such a limitation. In fact I am planning to install either Windows 7 x64 or Vista x64.

  • performance/price and performance
    The faster the memory is, the faster can CPU access it and thus your applications will run faster.
    There are two factors affecting memory performance: frequency and latency. The former should be as high as possible (1333 is the lowest and cheapest frequency for DDR3 that I’ve found on the net – note: allowed max and min frequency depends on the motherboard as well) but then again, not too high because of a non-linear increase of performance/price – you don’t gain that much performance if you increase the frequency insanely. Also beware that there are two frequency labels out there: one is the frequency itself (i.e. 1600Mhz) while the other is a PC3 rating that depends on the frequency (PC3 12700 for 1600Mhz).
    The other factor is latency. It is marked by a single number (i.e. CL9) or by a group of numbers where first number is CL (i.e. 9-9-9-27). The number(s) should be as low as possible because latency (simplified) states how much time is required for memory module to do an operation.
    Memory frequency is far more important than latency (look at the benchmark tests on the web). Thus invest in higher frequencies rather than lower latency. Or better, both, but the most important is frequency.
    After a while I concluded that I’ll go for a 1600Mhz/CL9 modules, partially because of price and partially because of the lack of the availability of lower latency 1600Mhz modules – I was shooting for CL7 but I couldn’t find any (OCZ has nice modules for a great price – but those can’t be found these days).

I bought a Super Talent 6GB/DDR3/1600/CL9 triple channel kit (SKU: WA160UX6G9) modules from Mlacom for 238 Euros.


See other relevant posts:

CPU cooler
The goal
Power Supply Unit

Building a computer Hardware Slovenia

Building an Intel Core i7 based computer – Power Supply Unit

If you think that power supply unit (PSU) seems like a non-important piece of the computer think again. It is the heart of the computer as it delivers the blood to the brains and other parts. The blood in this context is the electricity of course.

The PSU aspects that are important to me:

  • the quality of the components/build
    If you want to start a fire or have an instable computer then a no-name PSU is a good choice. They are cheap but they use low quality components and 220V (or other input voltages, i.e. 110V in the US) and a bunch of amperes can make some smoke at least if not start a huge fire. As it happened once to me. Luckily, I was at home at the time. I didn’t see smoke yet but I smelled that something is burning. After some “find that smell” exercise with my nose it turned out to be the low-quality PSU of my computer. Again, I was lucky that it happened while I was at home. The moral of the story is that you shouldn’t but a cheap junk PSU. Instead go with a branded one at least.
  • silence
    As usual, the bigger the cooling fan the better. There are some passively cooled PSUs out there however I wouldn’t use them since… well the point above and the fact that you might require additional fans on the chassis to cool them and they are not very powerful either. A heat controlled fan is a bonus – it would spin as fast as it is required and produce less noise when the temperature is low.
  • output power distribution
    Isn’t a 500W PSU equal to another 500W PSU? No, it isn’t. A PSU delivers various voltages to various computer components through various rails (wires). The declared power is distributed between these voltages. It is good as long every voltage has enough power. Even if PSU is rated at 1kW (yes, they do exist) and it lacks power even on only one rail then computer might behave oddly or it won’t turn on at all. PSU might even damage the computer components in such case.
  • energy efficiency
    The higher the better. It should be at least 80% (meaning that 20% is a waste). The higher the efficiency is the less energy gets wasted and your electricity bill is lower. Not to mention that the world benefits from it as well. Note also that efficiency varies with operating power. Check out 80plus website for more info on PSU energy efficiency.

I’ve been using Super Flower as manufacturer of my PSUs for some time now and I am happy with them although they are not a very well known manufacturer. Nevertheless web reviews are praising their PSUs in all the aspects mentioned above.

I’ve chosen the Aurora 600W (SF-600R14A) model (you won’t find it on their web site – which is a poor web site btw). It is rated at 82% efficiency though I don’t think it has been certified for (yet). It uses a huge 14cm cooling fan that is supposed to be very silent, furthermore it is heat-driven – it will adapt its speed to the actual conditions. 600W should be more than enough for my configuration. It should be enough for the most configurations, except for the dual graphic card ones (nVidia SLI, ATI CrossFire) (additional graphic card might draw a lot of additional power, i.e. 200W – depends on the card). So do calculate the power required in such case and buy an adequate PSU (again, check out the railings power).

Another bonus for Aurora is the usage of round cable connectors toward PSU. The round shape facilitates the air movement in the chassis and thus the cooling of the components. Another good thing is that cables are attached with connectors – you can attach and detach them if you don’t need them (as opposite to fixed cables on cheaper PSU). Less cables means better air movement and again, better cooling of the chassis interior. And less clutter in the chassis.




Bought it from CoolPC for 109,54€.


See other relevant posts:

CPU cooler 
The goal

Building a computer Hardware Slovenia

Building an Intel Core i7 based computer – The goal

Somehow I’ve missed two important things to mention in the introduction: what will I use computer for and the budget.

The computer is, of course, meant to be a development workstation that will replace my current aged Core 2 Duo E6600 based one. I’ll base my new computer on three pillars in this order of importance:

  1. Reliability
  2. Silence
  3. Performance and Price/Performance ratio

The first point is all about avoiding unnecessary risks by taking in consideration only quality components if possible and redundancy. Nothing is more important than data. And having certain disk redundancy keeps computer operational even if a single disk fails – a disk failure is not uncommon at all. Backups are important as well, but that’s another story.

Does second point really need an explanation? Do you want the noise level of a vacuum cleaner under the desk? If you work a lot with computer you’ll appreciate as quiet machine as it gets. Low noise is mostly achieved through passive cooling or big fans that rotate slowly – the bigger they are the slower they need to rotate and thus noise is lower.

So, performance and price make only the third pillar in order of importance. Of course those performance and price are important but only after the first two.

Se what’s left is the budget: 1501 euros. Expensive? Cheap? I think this is a good compromise for my three pillars of a development workstation.

In case that I’ve missed some other relevant information so far, let me know.

See other relevant posts:

Building an Intel Core i7 based computer – CPU cooler

.net 4.0 Parallel programming Slovenia VS 2010

Parallel computing in Visual Studio 2010/.net 4.0 slides

Just finished the presentation about Parallel computing in Visual Studio 2010/.net 4.0 at TŠC Nova Gorica (a part of Microsoft’s event for students). Audience was cool and almost everything went well, except for VS2010CTP crash at very beginning. Not a big problem, one has to expect such problems running CPT versions. Visual Studio restart fixed it.

All in all a good day for my presentation. Go get the slides here (slides are in Slovene language).

.net 3.5 ORM

Entity Framework leaves the door open to a SQL Injection attack?

I couldn’t believe it when I read Julie Lerman’s post about EF and SQL Injection. She discovered that Entity Framework doesn’t use parameterized queries always!

I had to try it for myself on Northwind database:

var query = from c in entities.Customers
                        where c.ContactName == "Tubo"
                        select c;

produces this SQL statement (courtesy of SQL Profiler):

[Extent1].[CustomerID] AS [CustomerID],
[Extent1].[CompanyName] AS [CompanyName],
[Extent1].[ContactName] AS [ContactName],
[Extent1].[ContactTitle] AS [ContactTitle],
[Extent1].[Address] AS [Address],
[Extent1].[City] AS [City],
[Extent1].[Region] AS [Region],
[Extent1].[PostalCode] AS [PostalCode],
[Extent1].[Country] AS [Country],
[Extent1].[Phone] AS [Phone],
[Extent1].[Fax] AS [Fax]
FROM [dbo].[Customers] AS [Extent1]
WHERE N'Tubo' = [Extent1].[ContactName]

See the Tubo condition expressed like a string? Speechless. Granted, if you specify a variable instead a string within the EF query then a parameter is used.

So I tried a classic SQL Injection attack, like this:

var query = from c in entities.Customers
                        where c.ContactName == "Tubo'; UPDATE [Northwind].Categories SET Description='SQL Injection' WHERE CategoryID=9; –'"
                        select c;

which produces this condition (select columns trimmed)

WHERE N'Tubo''; UPDATE [Northwind].Categories SET Description=''SQL Injection'' WHERE CategoryID=9; —''' = [Extent1].[ContactName]

Luckily the attack fails due to duplication of single quotes. So there is a protection against SQL attacks afterall.

However, I am not feeling safe with this approach. Attackers are smart and sooner or later they might find a way across string-replacement defense strategy.

But the real questions is: why leave the door open to a possible attack in first place? Why not always use parameters as there is no way around them? What good is to risk a SQL injection attack?

Update: A possible scenario where one could exploit this feature, granting there is a way around single-quote-replacement, is with add-ins. Imagine you have an add-in based application where each add-in is allowed to perform EF selects on database (enforced by your application). One could fake a select with all sort of T-SQL code nested within.

Building a computer Hardware Slovenia

Building an Intel Core i7 based computer – CPU cooler

The most valuable aspects for my computer are performance and silence.

The later means as less possible noise producing components and as silent moving parts as possible. The Core i7 920 comes usually in a boxed SKU which means that is comes with a stock cooler. This cooler usually isn’t meant to be silent but rather an average noisy one. Thus the need for a 3rd party solution. Core i7 has a different socket than previous Core 2 Duo line – 1366 as opposed to 775 (the change is mostly due to integrated memory controller and hence more pins for the memory bus). The change of sockets also means that all available coolers won’t work just like that and since the socket 1366 is pretty much new there are no many coolers to choose from. After googling a bit I’ve found one that caught my attention: Scythe Mugen 2. It natively supports socket 1366 and it has a 12cm fan. The bigger the fan is the slower it has to rotate and thus it produces less noise. Well actually it comes with a single low noise 12cm fan but one can attach additional three similar fans (which I don’t plan – one should be more than enough). Anyway, my rule of the thumb for any cooler – the bigger the fan is the less noise it produces.

I bought Scythe Mugen 2 from (Slovene online shop) for 49 Euros.

Here is a bunch of photos of the Scythe Mugen 2. I placed a CD case next to it to show the cooler’s relative size. There is also some cardboard stuffed in the cooler which I will remove before mounting it:

mugen4 mugen1 mugen2 mugen3

The cooler is one huge beast. Its size is amazing. At least is not that heavy. Few years ago I couldn’t imagine I’d mount coolers of this size and weight to motherboards.

Another important aspect of lowering the noise is fan speed controller on the mainboard. You attach the fan to the mainboard and BIOS takes care of fan speed. Not sure which motherboards support it but I am sure I’ll get one with proper support.

BTW if you wonder why I am buying a boxed CPU just to replace the stock cooler then wonder no more: non-boxed versions aren’t much cheaper and even if they were it is hard to find one.

See other relevant posts:


XBit's review

Building a computer Hardware Slovenia

Building an Intel Core i7 based computer – Introduction

I am starting to build a new computer for me and I’ll document the parts and decisions along the path.

Parts required for a computer:

  1. CPU
  2. Motherboard
  3. Memory
  4. Hard disks
  5. Chassis
  6. Power supply unit (PSU)
  7. CPU cooler
  8. Graphic card
  9. Operating system

Based on price/performance ration of new Intel Core i7 CPU line I’ve decided to build the computer around the i7 920 model which is the slowest of the i7 line yet it blasts all the Core 2 Quad line, not to mention Core 2 Duo line. It is a quad core CPU with hyperthreading thus it looks like 8 cores to the OS (albeit hyperthreading cores are not real ones – they can work in parallel only to a certain degree). It also features integrated memory controller which significantly reduces memory latency (lesson learned from AMD). The price of i7 920 is very reasonable as well: 282,8 Euros (all prices I’ll list are VAT included and expressed in Euros- use the currency converter such as Universal Currency Converter to convert prices to other currencies) from (Slovene online shop). I’ll get back to the CPU when I receive it.